summaryrefslogtreecommitdiff
path: root/taskapp/events
diff options
context:
space:
mode:
authornishanth2010-02-25 04:38:50 +0530
committernishanth2010-02-25 04:38:50 +0530
commit2d4d7d30683375420c409e53797fef2940d33005 (patch)
treefe065f98ea4aa39ef288c30f0cec6d66f6cdc6eb /taskapp/events
parent15c018e2d50d683dda8049347864815acd5aaee3 (diff)
downloadpytask-2d4d7d30683375420c409e53797fef2940d33005.tar.gz
pytask-2d4d7d30683375420c409e53797fef2940d33005.tar.bz2
pytask-2d4d7d30683375420c409e53797fef2940d33005.zip
added the capability to remove subtasks/dependencies .
Diffstat (limited to 'taskapp/events')
-rw-r--r--taskapp/events/task.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/taskapp/events/task.py b/taskapp/events/task.py
index 727b04e..a999dc7 100644
--- a/taskapp/events/task.py
+++ b/taskapp/events/task.py
@@ -167,3 +167,11 @@ def updateTask(task, title=None, desc=None, credits=None, tags_field=None):
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()