--- a/app.py Tue Dec 25 17:09:32 2012 +0900
+++ b/app.py Tue Dec 25 17:14:50 2012 +0900
safe_fields = ('name', 'color')
def delete(self, resource_id):
- for task in g.db.get_many('task', resource_id, with_doc=True):
- response = g.db.delete(task['doc'])
+ g.db.run('task', 'delete_for_project', resource_id)
return super(Project, self).delete(resource_id)
--- a/fruitbar/indexes.py Tue Dec 25 17:09:32 2012 +0900
+++ b/fruitbar/indexes.py Tue Dec 25 17:14:50 2012 +0900
+ def run_delete_for_project(self, db, project):
+ for task in db.get_many('task', project, with_doc=True):