mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 01:16:27 +00:00
Merge branch 'fix_mac_uniq' into 'dev'
Fix bug dans le model mac, renvoie une liste de mac uniques See merge request federez/re2o!336
This commit is contained in:
commit
f803326e44
1 changed files with 2 additions and 2 deletions
|
@ -609,9 +609,9 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
|||
if access_refresh:
|
||||
user_ldap.dialupAccess = str(self.has_access())
|
||||
if mac_refresh:
|
||||
user_ldap.macs = [str(mac) for mac in Interface.objects.filter(
|
||||
user_ldap.macs = sorted([str(mac) for mac in Interface.objects.filter(
|
||||
machine__user=self
|
||||
).values_list('mac_address', flat=True).distinct()]
|
||||
).values_list('mac_address', flat=True).distinct()])
|
||||
if group_refresh:
|
||||
# Need to refresh all groups because we don't know which groups
|
||||
# were updated during edition of groups and the user may no longer
|
||||
|
|
Loading…
Reference in a new issue