Reverse user_subject & user_object.
In the relationships table: user_subject should be the user doing the following. user_object should be the user who is followed. This fixes a bug where unfollowing a user deletes the relationship in both directions.
This commit is contained in:
@ -38,7 +38,7 @@ class User(AbstractUser):
|
||||
'self',
|
||||
symmetrical=False,
|
||||
through='UserRelationship',
|
||||
through_fields=('user_subject', 'user_object'),
|
||||
through_fields=('user_object', 'user_subject'),
|
||||
related_name='following'
|
||||
)
|
||||
favorites = models.ManyToManyField(
|
||||
|
Reference in New Issue
Block a user