From c406d3da83d20d65c2fc4da7d5d4d5db0f6ad115 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 2 Sep 2020 12:03:58 +0100 Subject: now limited queryset for essential service when creating new as from org --- ctrack/caf/forms.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ctrack/caf/forms.py') diff --git a/ctrack/caf/forms.py b/ctrack/caf/forms.py index 412d310..8e3d8ee 100644 --- a/ctrack/caf/forms.py +++ b/ctrack/caf/forms.py @@ -105,6 +105,9 @@ class ApplicableSystemCreateFromOrgForm(forms.Form): # self.fields["caf"].label = "CAF" self.fields["dft_categorisation"].label = "DfT Categorisation" self.fields["oes_categorisation"].label = "OES Categorisation" + self.fields["essential_service"].queryset = EssentialService.objects.filter( + pk=org_id + ) self.helper = FormHelper(self) self.helper.layout = Layout( Fieldset( -- cgit v1.2.3