taskapp/events/task.py
changeset 92 c99f09bebe56
parent 90 b2426897ff18
child 94 d1f59bbc2685
--- a/taskapp/events/task.py	Thu Feb 25 04:01:11 2010 +0530
+++ b/taskapp/events/task.py	Thu Feb 25 04:38:50 2010 +0530
@@ -167,3 +167,11 @@
     if tags_field:task.tags_field = tags_field
     task.save()
     return task
+
+def removeTask(main_task, sub_task):
+    """ get the corresponding map object and remove the sub_task.
+    """
+
+    mapobj = Map.objects.get(main=main_task)
+    mapobj.subs.remove(sub_task)
+    mapobj.save()