summaryrefslogtreecommitdiff
path: root/taskapp/views
diff options
context:
space:
mode:
authornishanth2010-03-03 14:19:40 +0530
committernishanth2010-03-03 14:19:40 +0530
commit321e1693ebc24eed39ecc13b906cd2bf06a36561 (patch)
treed1ec48ee8bf1171844a2630efd8e197c9c1b3249 /taskapp/views
parent5b17cba84de5e04f97c89a831c56a915c71369d9 (diff)
downloadpytask-321e1693ebc24eed39ecc13b906cd2bf06a36561.tar.gz
pytask-321e1693ebc24eed39ecc13b906cd2bf06a36561.tar.bz2
pytask-321e1693ebc24eed39ecc13b906cd2bf06a36561.zip
fixed a bug in view task.
Diffstat (limited to 'taskapp/views')
-rw-r--r--taskapp/views/task.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py
index ffaa2e1..5e5cb13 100644
--- a/taskapp/views/task.py
+++ b/taskapp/views/task.py
@@ -83,7 +83,7 @@ def view_task(request, tid):
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")