summaryrefslogtreecommitdiff
path: root/taskapp/events
diff options
context:
space:
mode:
authornishanth2010-03-03 05:34:32 +0530
committernishanth2010-03-03 05:34:32 +0530
commitd16aa3a81d9cacefbf4fe45b6380c0219b99a8e7 (patch)
treecff95435f685f5ec517882534e956d28b2bd7ad9 /taskapp/events
parentaba25958cad895353a8b03b2d41520680bf898d3 (diff)
downloadpytask-d16aa3a81d9cacefbf4fe45b6380c0219b99a8e7.tar.gz
pytask-d16aa3a81d9cacefbf4fe45b6380c0219b99a8e7.tar.bz2
pytask-d16aa3a81d9cacefbf4fe45b6380c0219b99a8e7.zip
fixed a bug in publish task.
Diffstat (limited to 'taskapp/events')
-rw-r--r--taskapp/events/task.py11
1 files changed, 6 insertions, 5 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"