Avoid unnecessary errors when a remote re-sends an Accept
This commit is contained in:
parent
779d2b0694
commit
0211dee0ff
1 changed files with 5 additions and 1 deletions
|
@ -171,7 +171,11 @@ class UserFollowRequest(ActivitypubMixin, UserRelationship):
|
||||||
return
|
return
|
||||||
|
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
UserFollows.from_request(self)
|
try:
|
||||||
|
UserFollows.from_request(self)
|
||||||
|
except IntegrityError:
|
||||||
|
# this just means we already saved this relationship
|
||||||
|
pass
|
||||||
if self.id:
|
if self.id:
|
||||||
self.delete()
|
self.delete()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue