Commit 2d14e1f1 authored by chirac's avatar chirac

Bug fix : n'affiche que les ip libres avec les droits infra

parent edca49dc
......@@ -57,6 +57,9 @@ class EditInterfaceForm(ModelForm):
self.fields['mac_address'].label = 'Adresse mac'
self.fields['type'].label = 'Type de machine'
self.fields['type'].empty_label = "Séléctionner un type de machine"
if "ipv4" in self.fields:
self.fields['ipv4'].empty_label = "Assignation automatique de l'ipv4"
self.fields['ipv4'].queryset = IpList.objects.filter(interface__isnull=True)
if "machine" in self.fields:
self.fields['machine'].queryset = Machine.objects.all().select_related('user')
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