Commit 1c3d1e6b authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #206 from matchbox/bulk-delete-hook

make bulk deletes go through `delete_model`
parents e849aee6 d445abec
......@@ -394,8 +394,7 @@ class ModelView(BaseModelView):
all_ids = [ObjectId(pk) for pk in ids]
for obj in self.get_query().in_bulk(all_ids).values():
obj.delete()
count += 1
count += self.delete_model(obj)
flash(ngettext('Model was successfully deleted.',
'%(count)s models were successfully deleted.',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment