mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 08:36:32 +00:00
Python formatting
This commit is contained in:
parent
32e694032b
commit
79424f7bfb
1 changed files with 5 additions and 3 deletions
|
@ -354,9 +354,11 @@ class Boost(ActivityMixin, Status):
|
|||
# This constraint can't work as it would cross tables.
|
||||
# class Meta:
|
||||
# unique_together = ('user', 'boosted_status')
|
||||
if Boost.objects.filter(
|
||||
boosted_status=self.boosted_status, user=self.user
|
||||
).exclude(id=self.id).exists():
|
||||
if (
|
||||
Boost.objects.filter(boosted_status=self.boosted_status, user=self.user)
|
||||
.exclude(id=self.id)
|
||||
.exists()
|
||||
):
|
||||
return
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
|
Loading…
Reference in a new issue