taskapp/events/task.py
changeset 92 c99f09bebe56
parent 90 b2426897ff18
child 94 d1f59bbc2685
equal deleted inserted replaced
91:1b5ad4b7c40e 92:c99f09bebe56
   165     if desc:task.desc = desc
   165     if desc:task.desc = desc
   166     if credits:task.credits = credits
   166     if credits:task.credits = credits
   167     if tags_field:task.tags_field = tags_field
   167     if tags_field:task.tags_field = tags_field
   168     task.save()
   168     task.save()
   169     return task
   169     return task
       
   170 
       
   171 def removeTask(main_task, sub_task):
       
   172     """ get the corresponding map object and remove the sub_task.
       
   173     """
       
   174 
       
   175     mapobj = Map.objects.get(main=main_task)
       
   176     mapobj.subs.remove(sub_task)
       
   177     mapobj.save()