fix handling of cascade argument

pull/91/head
eric 2018-06-19 10:43:42 -04:00
parent d8171088a6
commit b709ad93f8
1 changed files with 2 additions and 2 deletions

View File

@ -141,8 +141,8 @@ class Work(models.Model):
self._last_campaign = None
super(Work, self).__init__(*args, **kwargs)
def delete(self, *args, **kwargs):
if kwargs.get('cascade', True):
def delete(self, cascade=True, *args, **kwargs):
if cascade:
if self.offers.all() or self.claim.all() or self.campaigns.all() or self.acqs.all() \
or self.holds.all() or self.landings.all():
return