Skip to content

Commit

Permalink
Fix Placeholder.delete() signature (with keep_parents=False as new arg)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdboor committed May 1, 2017
1 parent 467d69d commit 6d85f6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fluent_contents/models/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ def get_absolute_url(self):
except AttributeError:
return None

def delete(self, using=None):
def delete(self, *args, **kwargs):
# Some databases may not have a proper ON DELETE rule set, causing a DatabaseError on delete.
# This happened because South 0.7.4 didn't support on_delete=SET_NULL.
ContentItem.objects.filter(placeholder=self).update(placeholder=None)
super(Placeholder, self).delete(using)
super(Placeholder, self).delete(*args, **kwargs)

delete.alters_data = True

Expand Down

0 comments on commit 6d85f6b

Please sign in to comment.