Call assert_not_deleted before every @transaction.

This commit is contained in:
voussoir 2020-09-20 12:46:52 -07:00
parent 497abf26cd
commit 317fa3b51d

View file

@ -75,6 +75,9 @@ def transaction(method):
''' '''
@functools.wraps(method) @functools.wraps(method)
def wrapped_transaction(self, *args, **kwargs): def wrapped_transaction(self, *args, **kwargs):
if isinstance(self, objects.ObjectBase):
self.assert_not_deleted()
photodb = _get_relevant_photodb(self) photodb = _get_relevant_photodb(self)
commit = kwargs.pop('commit', False) commit = kwargs.pop('commit', False)