forms: category manual ordering on management forms page (#48539)

This commit is contained in:
Lauréline Guérin 2020-11-16 16:26:22 +01:00
parent aef2d25d77
commit 3da670ede4
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
1 changed files with 2 additions and 1 deletions

View File

@ -769,7 +769,8 @@ class ManagementDirectory(Directory):
def display_forms(self, forms_list):
r = TemplateIO(html=True)
r += htmltext('<ul class="biglist">')
cats = Category.select(order_by = 'name')
cats = Category.select()
Category.sort_by_position(cats)
for c in cats + [None]:
if c is None:
l2 = [x for x in forms_list if not x[0].category_id]