Skip to content

Commit

Permalink
fixed: GenericUserToGroup manager add method duplicates history records
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasili Ivanov committed Mar 23, 2021
1 parent 8fec0d7 commit 2da0fff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protector/managers.py
Expand Up @@ -113,7 +113,7 @@ def add(self, users, reason, roles=None, responsible=None):
reason=reason,
defaults={'roles': roles, 'responsible': responsible}
)
if not created:
if not created and gug.roles != roles:
gug.roles |= roles
gug.save(reason=reason)

Expand Down

0 comments on commit 2da0fff

Please sign in to comment.