diff --git a/fedireads/incoming.py b/fedireads/incoming.py index 6fd612092..225177ced 100644 --- a/fedireads/incoming.py +++ b/fedireads/incoming.py @@ -207,9 +207,9 @@ def handle_incoming_follow(activity): relationship_id=activity['id'] ) except django.db.utils.IntegrityError: - # Duplicate follow request. Not sure what the correct behaviour is, but just dropping - # it works for now. We should perhaps generate the Accept, but then do we need to match - # the activity id? + # Duplicate follow request. Not sure what the correct behaviour is, but + # just dropping it works for now. We should perhaps generate the + # Accept, but then do we need to match the activity id? return HttpResponse() outgoing.handle_outgoing_accept(user, to_follow, activity) diff --git a/fedireads/models/user.py b/fedireads/models/user.py index d4135cef3..37c9cbca1 100644 --- a/fedireads/models/user.py +++ b/fedireads/models/user.py @@ -75,7 +75,10 @@ class UserRelationship(FedireadsModel): class Meta: constraints = [ - models.UniqueConstraint(fields=['user_subject', 'user_object'], name='followers_unique') + models.UniqueConstraint( + fields=['user_subject', 'user_object'], + name='followers_unique' + ) ] @property