fix user limits

This commit is contained in:
albert
2013-02-22 14:55:10 -05:00
parent 702d5002f7
commit 2c317fa161

View File

@@ -40,7 +40,7 @@ class UserPresenter
def upload_limit
deleted_count = Post.for_user(user.id).deleted.count
pending_count = Post.for_user(user.id).pending.count
approved_count = Post.where("is_flagged = false and is_pending = false and uploader_id = ?", user.id).count
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", user.id).count
if user.base_upload_limit
limit = user.base_upload_limit - pending_count