taskapp/events/task.py
changeset 189 8f5fb15ffd9b
parent 167 b61e45074ba1
child 195 2717c8533322
--- a/taskapp/events/task.py	Wed Mar 03 05:30:53 2010 +0530
+++ b/taskapp/events/task.py	Wed Mar 03 05:34:32 2010 +0530
@@ -8,12 +8,13 @@
 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"