Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit eb8ba218 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

FIx bug creation machine

parent e887b644
......@@ -55,7 +55,8 @@ 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"
self.fields['machine'].queryset = Machine.objects.all().select_related('user')
if "machine" in self.fields:
self.fields['machine'].queryset = Machine.objects.all().select_related('user')
def clean(self):
data = super(EditInterfaceForm, self).clean()
......
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