core: ensure user settings are sorted by name

This commit is contained in:
Jens Langhammer 2020-06-30 21:24:58 +02:00
parent ce2230f774
commit b61f595562
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def user_stages(context: RequestContext) -> List[UIUserSettings]:
if not user_settings:
continue
matching_stages.append(user_settings)
return matching_stages
return sorted(matching_stages, key=lambda x: x.name)
@register.simple_tag(takes_context=True)
@ -42,4 +42,4 @@ def user_sources(context: RequestContext) -> List[UIUserSettings]:
policy_engine.build()
if policy_engine.passing:
matching_sources.append(user_settings)
return matching_sources
return sorted(matching_sources, key=lambda x: x.name)