Fix a bug in get_all_affected_users method
@@ -179,7 +179,7 @@ class Restriction(CRUDModel, Base): # type: ignore
def get_all_affected_users(self):
"""Will return all users affected by this restriction, i.e. users directly assigned to this restriction
and members of all groups assigned to this restriction."""
- affected_users = self.users
+ affected_users = self.users[:]
for group in self.groups:
affected_users.extend(group.users)
return list(set(affected_users))
