Don't save duplicate boosts

This commit is contained in:
Mouse Reeve
2021-04-22 19:36:27 -07:00
parent 9148f36719
commit b457446f2f
2 changed files with 10 additions and 4 deletions

View File

@ -204,10 +204,8 @@ class ObjectMixin(ActivitypubMixin):
created = created or not bool(self.id)
# first off, we want to save normally no matter what
super().save(*args, **kwargs)
if (
not broadcast
or hasattr(self, "status_type")
and self.status_type == "Announce"
if not broadcast or (
hasattr(self, "status_type") and self.status_type == "Announce"
):
return