Fixes deletion for boosts
This commit is contained in:
parent
7b21a0a208
commit
e8e4ed773c
2 changed files with 8 additions and 2 deletions
|
@ -86,6 +86,10 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
|||
|
||||
def delete(self, *args, **kwargs):#pylint: disable=unused-argument
|
||||
''' "delete" a status '''
|
||||
if hasattr(self, 'boosted_status'):
|
||||
# okay but if it's a boost really delete it
|
||||
super().delete(*args, **kwargs)
|
||||
return
|
||||
self.deleted = True
|
||||
self.deleted_date = timezone.now()
|
||||
self.save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue