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

Merge branch 'fix_sw_order' into 'dev'

Fix display switchs order

See merge request federez/re2o!343
This commit is contained in:
chirac 2018-10-27 23:32:55 +02:00
commit a9ec23c260
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):