mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 15:12:25 +00:00
Fix et optimise la collecte d'adresse mac pour ldap
This commit is contained in:
parent
cbdcdd6dbe
commit
473ae3afea
1 changed files with 4 additions and 4 deletions
|
@ -576,10 +576,10 @@ class User(AbstractBaseUser):
|
||||||
if access_refresh:
|
if access_refresh:
|
||||||
user_ldap.dialupAccess = str(self.has_access())
|
user_ldap.dialupAccess = str(self.has_access())
|
||||||
if mac_refresh:
|
if mac_refresh:
|
||||||
user_ldap.macs = [inter.mac_bare() for inter in
|
user_ldap.macs = [str(mac) for mac in Interface.objects.filter(
|
||||||
Interface.objects.filter(
|
machine__user=self
|
||||||
machine__in=Machine.objects.filter(user=self)
|
).values_list('mac_address', flat=True).distinct()]
|
||||||
)]
|
|
||||||
user_ldap.save()
|
user_ldap.save()
|
||||||
|
|
||||||
def ldap_del(self):
|
def ldap_del(self):
|
||||||
|
|
Loading…
Reference in a new issue