# HG changeset patch # User anoop # Date 1267698507 -19800 # Node ID b1a1a50172685d78dfb139df9238ef97fc8b5fa6 # Parent 3b28b1f9bf0649380dc57d3f4d5d16ae74809433# Parent 2759d422ad8963368c8a0585c91af3c92fb363b5 merged diff -r 3b28b1f9bf06 -r b1a1a5017268 taskapp/events/task.py --- a/taskapp/events/task.py Thu Mar 04 15:56:25 2010 +0530 +++ b/taskapp/events/task.py Thu Mar 04 15:58:27 2010 +0530 @@ -148,7 +148,13 @@ claim.creation_datetime = datetime.now() claim.save() - user.request_sent_to.filter(is_replied=False, is_valid=True, role="MT", task=task).update(is_valid=False) + pending_reqs = user.request_sent_to.filter(is_replied=False, is_valid=True, role="MT", task=task).all() + for req in pending_reqs: + req.is_valid = False + req.save() + user_url = '%s'%(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) def assignTask(task, added_user, assigned_by): """ check for the status of task and assign it to the particular user """ diff -r 3b28b1f9bf06 -r b1a1a5017268 templates/user/view_request.html --- a/templates/user/view_request.html Thu Mar 04 15:56:25 2010 +0530 +++ b/templates/user/view_request.html Thu Mar 04 15:58:27 2010 +0530 @@ -19,7 +19,7 @@ {{to_user.username}}  {% endfor %}
- sent on {{notification.sent_date|date:"D d M Y"}} at {{notification.sent_date|time:"H:i"}}
+ sent on {{req.sent_date|date:"D d M Y"}} at {{req.sent_date|time:"H:i"}}
Message:
{% ifequal "PY" req.role %} {{req.sent_by.username}} assigned {{req.pynts}} pynts to