fixed a bug in view task.
authornishanth
Wed, 03 Mar 2010 14:19:40 +0530
changeset 193 505bbe421be4
parent 192 8c982f517786
child 194 e43ceb9c4ec3
fixed a bug in view task.
taskapp/views/task.py
--- a/taskapp/views/task.py	Wed Mar 03 11:21:33 2010 +0530
+++ b/taskapp/views/task.py	Wed Mar 03 14:19:40 2010 +0530
@@ -83,7 +83,7 @@
     claimed_users = task.claimed_users.all()
 
 
-    is_requested_mentor = True if user.request_sent_to.filter(is_valid=True,is_replied=False,role="MT",task=task) else False
+    is_requested_mentor = True if user.is_authenticated() and user.request_sent_to.filter(is_valid=True,is_replied=False,role="MT",task=task) else False
     task_viewable = True if ( task.status != "UP" ) or is_mentor or is_requested_mentor else False
     if not task_viewable:
         return show_msg(user, "You are not authorised to view this task", "/task/browse/", "browse the tasks")