Sort folders alphabetically

To match the order in which templates are sorted.
This commit is contained in:
Chris Hill-Scott
2018-11-09 16:04:49 +00:00
parent 07dd59f5b6
commit 4c9f667de3
3 changed files with 8 additions and 5 deletions

View File

@@ -289,7 +289,10 @@ class Service():
@cached_property
def all_template_folders(self):
return template_folder_api_client.get_template_folders(self.id)
return sorted(
template_folder_api_client.get_template_folders(self.id),
key=lambda folder: folder['name'].lower(),
)
@cached_property
def all_template_folder_ids(self):