From c1a24fa155895374961f547a7894e9232436d583 Mon Sep 17 00:00:00 2001 From: chirac Date: Wed, 18 Oct 2017 02:58:17 +0200 Subject: [PATCH] =?UTF-8?q?Opti=20les=20requ=C3=A8tes=20sur=20chargement?= =?UTF-8?q?=20de=20l'edition=20d'un=20switch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- topologie/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/topologie/forms.py b/topologie/forms.py index 267d64b0..5f5993a4 100644 --- a/topologie/forms.py +++ b/topologie/forms.py @@ -105,6 +105,8 @@ class EditSwitchForm(ModelForm): def __init__(self, *args, **kwargs): prefix = kwargs.pop('prefix', self.Meta.model.__name__) super(EditSwitchForm, self).__init__(*args, prefix=prefix, **kwargs) + self.fields['switch_interface'].queryset = Interface.objects.all()\ + .select_related('domain__extension') self.fields['location'].label = 'Localisation' self.fields['number'].label = 'Nombre de ports'