1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-22 15:32:22 +00:00

Order aliases by name

This commit is contained in:
Yohann D'ANELLO 2020-07-29 19:03:11 +02:00
parent 5a91cac08d
commit 20011db37e

View File

@ -109,7 +109,7 @@ class ConsumerViewSet(ReadOnlyProtectedModelViewSet):
queryset = queryset.filter(
Q(name__regex="^" + alias)
| Q(normalized_name__regex="^" + Alias.normalize(alias))
| Q(normalized_name__regex="^" + alias.lower()))
| Q(normalized_name__regex="^" + alias.lower())).order_by('name')
return queryset