8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-25 22:22:26 +00:00

Fix display switchs order

This commit is contained in:
Gabriel Detraz 2018-10-27 23:31:12 +02:00 committed by root
parent 006e7d1de4
commit dbc15118ec
2 changed files with 2 additions and 2 deletions

View file

@ -120,7 +120,7 @@ class EditOptionalTopologieForm(ModelForm):
self.fields['vlan_decision_nok'].label = _("VLAN for machines rejected"
" by RADIUS")
self.initial['automatic_provision_switchs'] = Switch.objects.filter(automatic_provision=True)
self.initial['automatic_provision_switchs'] = Switch.objects.filter(automatic_provision=True).order_by('interface__domain__name')
def save(self, commit=True):
instance = super().save(commit)

View file

@ -260,7 +260,7 @@ class OptionalTopologie(AclMixin, PreferencesModel):
def provisioned_switchs(self):
"""Liste des switches provisionnés"""
from topologie.models import Switch
return Switch.objects.filter(automatic_provision=True)
return Switch.objects.filter(automatic_provision=True).order_by('interface__domain__name')
@cached_property
def switchs_management_interface(self):