diff --git a/app/models/user.rb b/app/models/user.rb index e4e945af5..10d69230f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -381,7 +381,7 @@ class User < ActiveRecord::Base def upload_limit deleted_count = Post.for_user(id).deleted.count pending_count = Post.for_user(id).pending.count - approved_count = Post.where("is_flagged = false and is_pending = false and uploader_id = ?", id).count + approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", id).count if base_upload_limit limit = base_upload_limit - pending_count