Sort the list of root cabinets. Thanks to Thomas Plotkowiak

for the request.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-09-05 03:41:09 -04:00
parent 5c138c7dbc
commit 9fbcfcf00f
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,8 @@
document properties edited events. Preserve the user that
initially creates the document. GitLab issue #433. Thanks
to Jesaja Everling(@jeverling) for the report.
- Sort the list of root cabinets. Thanks to Thomas Plotkowiak
for the request.
2.7.1 (2017-09-03)

View File

@@ -153,7 +153,9 @@ class CabinetListView(SingleObjectListView):
}
def get_object_list(self):
return Cabinet.objects.root_nodes()
# Add explicit ordering of root nodes since the queryset returned
# is not affected by the model's order Meta option.
return Cabinet.objects.root_nodes().order_by('label')
class DocumentCabinetListView(CabinetListView):