From d16aa3a81d9cacefbf4fe45b6380c0219b99a8e7 Mon Sep 17 00:00:00 2001 From: nishanth Date: Wed, 3 Mar 2010 05:34:32 +0530 Subject: fixed a bug in publish task. --- taskapp/events/task.py | 11 ++++++----- templates/index.html | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/taskapp/events/task.py b/taskapp/events/task.py index 04cdd2d..19e84b2 100644 --- a/taskapp/events/task.py +++ b/taskapp/events/task.py @@ -8,12 +8,13 @@ from pytask.taskapp.utilities.notification import create_notification def publishTask(task, rem_mentors=True, rem_comments=True): """ set the task status to open """ - if task.sub_type == 'D': - deps, subs = task.map_subs.all(), [] - else: - subs, deps = task.map_subs.all(), [] + # if task.sub_type == 'D': + # deps, subs = task.map_subs.all(), [] + #else: + # subs, deps = task.map_subs.all(), [] - if subs or any(map(lambda t:t.status!="CM",deps)): + task = getTask(task.id) + if task.subs or any(map(lambda t:t.status!="CM",task.deps)): task.status = "LO" else: task.status = "OP" diff --git a/templates/index.html b/templates/index.html index ce8e2d9..b809faf 100644 --- a/templates/index.html +++ b/templates/index.html @@ -91,7 +91,7 @@
  • {{a_task.title}}
  • {% endfor %} -

    +
    {% endif %} {% if mentored_tasks %} @@ -100,7 +100,7 @@
  • {{a_task.title}}
  • {% endfor %} -

    +
    {% endif %} {% if working_tasks %} @@ -109,7 +109,7 @@
  • {{a_task.title}}
  • {% endfor %} -

    +
    {% endif %} {% if claimed_tasks %} @@ -118,7 +118,7 @@
  • {{a_task.title}}
  • {% endfor %} -

    +
    {% endif %} {% endblock %} -- cgit