Commit 473ae3af authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root
Browse files

Fix et optimise la collecte d'adresse mac pour ldap

parent cbdcdd6d
...@@ -576,10 +576,10 @@ class User(AbstractBaseUser): ...@@ -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()]
def ldap_del(self): def ldap_del(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment