mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 07:02:26 +00:00
Optimisation sur la methode qui renvoie les interfaces d'un user
This commit is contained in:
parent
9e0ab9df33
commit
c965820526
1 changed files with 1 additions and 1 deletions
|
@ -378,7 +378,7 @@ class User(AbstractBaseUser):
|
|||
def user_interfaces(self, active=True):
|
||||
""" Renvoie toutes les interfaces dont les machines appartiennent à self
|
||||
Par defaut ne prend que les interfaces actives"""
|
||||
return Interface.objects.filter(machine__in=Machine.objects.filter(user=self, active=active))
|
||||
return Interface.objects.filter(machine__in=Machine.objects.filter(user=self, active=active)).select_related('domain__extension')
|
||||
|
||||
def assign_ips(self):
|
||||
""" Assign une ipv4 aux machines d'un user """
|
||||
|
|
Loading…
Reference in a new issue