diff options
author | nishanth | 2010-02-28 14:44:10 +0530 |
---|---|---|
committer | nishanth | 2010-02-28 14:44:10 +0530 |
commit | 4c7b03f6ca38e30b5394456ea9792e5cd6b4bfde (patch) | |
tree | c328c9b37f356c08c6a472923f78c8a3b88802ec /taskapp/utilities/user.py | |
parent | 33857f7042c0e72b29a8963b2ee3fe3c9696197b (diff) | |
download | pytask-4c7b03f6ca38e30b5394456ea9792e5cd6b4bfde.tar.gz pytask-4c7b03f6ca38e30b5394456ea9792e5cd6b4bfde.tar.bz2 pytask-4c7b03f6ca38e30b5394456ea9792e5cd6b4bfde.zip |
now if a user accepts to be a mentor, all his pending reqs will be made invalid.
Diffstat (limited to 'taskapp/utilities/user.py')
-rw-r--r-- | taskapp/utilities/user.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/taskapp/utilities/user.py b/taskapp/utilities/user.py index bafac0b..79dc22f 100644 --- a/taskapp/utilities/user.py +++ b/taskapp/utilities/user.py @@ -6,8 +6,8 @@ def get_user(user): """ get the no of unread requests and notifications and add them as properties for user. """ - unread_notifications = user.notification_sent_to.filter(is_read=False,is_deleted=False).count - unread_requests = user.request_sent_to.filter(is_valid=True,is_replied=False).count + unread_notifications = user.notification_sent_to.filter(is_read=False,is_deleted=False) + unread_requests = user.request_sent_to.filter(is_valid=True,is_replied=False) user.unread_notifications = unread_notifications user.unread_requests = unread_requests |