Don't use len, use count

This commit is contained in:
2012-06-08 20:39:59 +01:00
parent 5180712cef
commit 6f1a93713f

View File

@@ -117,7 +117,7 @@ def send_message(application, message_type, note=None):
except: except:
pass pass
if installed('reddit') and len(application.user.redditaccount_set.all()) > 0: if installed('reddit') and application.user.redditaccount_set.count():
from reddit.tasks import send_reddit_message from reddit.tasks import send_reddit_message
for account in application.user.redditaccount_set.all(): for account in application.user.redditaccount_set.all():