aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-08-01 16:21:39 +0100
committerMatthew Lemon <y@yulqen.org>2024-08-01 16:21:39 +0100
commitdd4fd5f4575fb68b584c4131a04a74a11e2902a5 (patch)
tree3958e90424b0250ff839dc524907f41a2876b297 /pyblackbird_cc
parentdc3c5a7ac20ecddfb4d54c65d8b67b8f010caeb1 (diff)
Ordering the subcategories dropdown list on the update form.
Diffstat (limited to 'pyblackbird_cc')
-rw-r--r--pyblackbird_cc/resources/forms.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pyblackbird_cc/resources/forms.py b/pyblackbird_cc/resources/forms.py
index be90a00..41ad3c8 100644
--- a/pyblackbird_cc/resources/forms.py
+++ b/pyblackbird_cc/resources/forms.py
@@ -161,6 +161,7 @@ class ResourceUpdateMetadataForm(forms.ModelForm):
super().__init__(*args, **kwargs)
self.helper = FormHelper(self)
self.helper.add_input(Submit("submit", "Submit"))
+ self.fields['subcategories'].queryset = ResourceSubcategory.objects.all().order_by('name')
error_css_class = "error"
required_css_class = "required"