summaryrefslogtreecommitdiff
path: root/taskapp/events
diff options
context:
space:
mode:
authornishanth2010-03-04 17:29:00 +0530
committernishanth2010-03-04 17:29:00 +0530
commite19c6effc9fd28adece4f9bd005359037382d025 (patch)
treef1445ce02503546e3bf515e4dc4825be7cc5c763 /taskapp/events
parentae3e80fb419756c040c786d7269f00db2739777c (diff)
downloadpytask-e19c6effc9fd28adece4f9bd005359037382d025.tar.gz
pytask-e19c6effc9fd28adece4f9bd005359037382d025.tar.bz2
pytask-e19c6effc9fd28adece4f9bd005359037382d025.zip
now a notification is sent to all the mentors after there is a new claim.
Diffstat (limited to 'taskapp/events')
-rw-r--r--taskapp/events/task.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/taskapp/events/task.py b/taskapp/events/task.py
index 0a077ce..5fb896c 100644
--- a/taskapp/events/task.py
+++ b/taskapp/events/task.py
@@ -155,6 +155,9 @@ def addClaim(task, message, user):
user_url = '<a href="/user/view/uid=%s">%s</a>'%(user.id, user.username)
reason = "User has claimed the task and hence cannot be a mentor and this request was made invalid."
create_notification("MT", req.sent_by, user, task=task, reply=False, remarks=reason, requested_by=req.sent_by)
+
+ for a_mentor in task.mentors.all():
+ create_notification("CL", a_mentor, user, task=task, remarks=message)
def assignTask(task, added_user, assigned_by):
""" check for the status of task and assign it to the particular user """