diff options
Diffstat (limited to 'taskapp/views')
-rw-r--r-- | taskapp/views/task.py | 2 |
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") |