aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/resources/forms.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pyblackbird_cc/resources/forms.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/pyblackbird_cc/resources/forms.py b/pyblackbird_cc/resources/forms.py
index f4c6654..00869be 100644
--- a/pyblackbird_cc/resources/forms.py
+++ b/pyblackbird_cc/resources/forms.py
@@ -20,12 +20,9 @@ ALLOWED_PDFS = 20
def _create_choices_tuple() -> List[Tuple[str, str]]:
- qs_lst = list(ResourceSubcategory.objects.values_list('name', flat=True))
- qs_lst.sort()
- res = []
- for x in qs_lst:
- res.append((x, x))
- return res
+ """Returns a list of tuples containing resource subcategory names."""
+ return sorted(list(ResourceSubcategory.objects.values_list('name', flat=True)), key=str)
+
class ResourceCreateForm(forms.Form):