# HG changeset patch # User nishanth # Date 1267595493 -19800 # Node ID 8c982f517786c975701636a75561e4b77c16dda3 # Parent 3bfe70742aa8e5afad812948653aac48ceed46c6 fixed a small syntax error . diff -r 3bfe70742aa8 -r 8c982f517786 taskapp/views/task.py --- a/taskapp/views/task.py Wed Mar 03 11:19:42 2010 +0530 +++ b/taskapp/views/task.py Wed Mar 03 11:21:33 2010 +0530 @@ -82,10 +82,14 @@ claimed_users = task.claimed_users.all() - task_viewable = True if ( task.status != "UP" ) or is_mentor or user.request_sent_to.filter(is_valid=True,is_replied=False,role="MT",task=task)else False + + is_requested_mentor = True if 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") + context['is_requested_mentor'] = is_requested_mentor + context['can_publish'] = True if task.status == "UP" and user == task.created_by else False context['can_edit'] = True if task.status == "UP" and is_mentor else False context['can_close'] = True if task.status not in ["UP", "CD", "CM"] and is_mentor else False