When bulk-deleting, skip objects which are not "deletable"

whatever that means in context
This commit is contained in:
Lance Edgar 2023-08-09 18:04:51 -05:00
parent 4ecea891b3
commit 90075b3b65

View file

@ -1728,6 +1728,7 @@ class MasterView(View):
def bulk_delete_objects(self, session, objects, progress=None): def bulk_delete_objects(self, session, objects, progress=None):
def delete(obj, i): def delete(obj, i):
if self.deletable_instance(obj):
self.delete_instance(obj) self.delete_instance(obj)
if i % 1000 == 0: if i % 1000 == 0:
session.flush() session.flush()