taskapp/utilities/task.py
changeset 155 52958289d81f
parent 120 aad4e6065d85
--- a/taskapp/utilities/task.py	Sun Feb 28 22:58:58 2010 +0530
+++ b/taskapp/utilities/task.py	Mon Mar 01 02:09:00 2010 +0530
@@ -27,8 +27,10 @@
     deps, subs = task.deps, task.subs
     if deps and task.status in ["OP", "LO"]:
         task.status = "OP" if all(map(lambda t:t.status=="CM",deps)) else "LO"
-    if subs and task.status in ["OP", "LO", "CM"]:
-        task.status = "CM" if all(map(lambda t:t.status=="CM",subs)) else "LO"
+
+    ## a task with subs will remain in "LO" and will be made "OP" only if all subs are removed.
+    if subs and task.status in ["OP", "LO"]:
+        task.status = "LO"
 
     task.save()
     return task