This commit is contained in:
albert
2013-02-19 14:12:51 -05:00
parent 7ffdbedc8d
commit 9d5cd91fa1

View File

@@ -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