summaryrefslogtreecommitdiff
path: root/taskapp/views/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'taskapp/views/task.py')
-rw-r--r--taskapp/views/task.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py
index 5a7c8e3..372e361 100644
--- a/taskapp/views/task.py
+++ b/taskapp/views/task.py
@@ -38,7 +38,7 @@ def view_task(request, tid):
is_guest = True if not user.is_authenticated() else False
is_mentor = True if user in task.mentors.all() else False
- task_claimable = True if task.status in ["OP", "RE"] else False
+ task_claimable = True if task.status in ["OP", "WR"] else False
context = {'user':user,
'task':task,
@@ -49,9 +49,10 @@ def view_task(request, tid):
'errors':errors,
}
- if task.status == "AS":
- context['assigned_user'] = task.assigned_users.all()[0]
-
+ assigned_users = task.assigned_users.all()
+ if assigned_users:
+ context['assigned_users'] = assigned_users
+
if request.method == 'POST':
if not is_guest:
data = request.POST["data"]