admin: sort apps in meta api

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-04 12:17:35 +02:00
parent 8a7c414031
commit a2cfe9c2a7
1 changed files with 1 additions and 1 deletions

View File

@ -26,6 +26,6 @@ class AppsViewSet(ViewSet):
def list(self, request: Request) -> Response:
"""List current messages and pass into Serializer"""
data = []
for app in get_apps():
for app in sorted(get_apps(), key=lambda app: app.name):
data.append({"name": app.name, "label": app.verbose_name})
return Response(AppSerializer(data, many=True).data)