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

Prechargement des données batiment/résidences pour selection des chambres

This commit is contained in:
Gabriel Detraz 2019-08-07 00:44:44 +02:00
parent 0770da51d1
commit 105348b73a

View file

@ -93,6 +93,7 @@ class EditPortForm(FormRevMixin, ModelForm):
Interface.objects.all().select_related('domain__extension') Interface.objects.all().select_related('domain__extension')
) )
self.fields['related'].queryset = Port.objects.all().prefetch_related('switch__machine_ptr__interface_set__domain__extension') self.fields['related'].queryset = Port.objects.all().prefetch_related('switch__machine_ptr__interface_set__domain__extension')
self.fields['room'].queryset = Room.objects.all().select_related('building__dormitory')
class AddPortForm(FormRevMixin, ModelForm): class AddPortForm(FormRevMixin, ModelForm):