From 9d5cd91fa195da75e3e3ab768f1747d39d77f778 Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 19 Feb 2013 14:12:51 -0500 Subject: [PATCH] fixes #394 --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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