aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/forms.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-09-02 12:03:58 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-09-02 12:03:58 +0100
commitc406d3da83d20d65c2fc4da7d5d4d5db0f6ad115 (patch)
treeb94edf8e069911d0aea4e1acfc23a72a180cb2cf /ctrack/caf/forms.py
parent6610509f3a3ceab151bc70305508892c9fe00e7b (diff)
now limited queryset for essential service when creating new as from org
Diffstat (limited to 'ctrack/caf/forms.py')
-rw-r--r--ctrack/caf/forms.py3
1 files changed, 3 insertions, 0 deletions
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(