def remove_task(task_id): task = __get_task(task_id) if task: db_session.delete(task) db_session.commit() else: raise Exception, "Invalid task id"
def remove_tasklist(tasklist_id): tasklist = get_tasklist(tasklist_id) if tasklist: db_session.delete(tasklist) db_session.commit() else: raise Exception, "Invalid tasklist id"