core: replace uid with uuid search
uid can't be searched it as its a computed field closes #2480 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
3bdb551e74
commit
54f170650a
|
@ -199,7 +199,7 @@ class UsersFilter(FilterSet):
|
|||
)
|
||||
|
||||
is_superuser = BooleanFilter(field_name="ak_groups", lookup_expr="is_superuser")
|
||||
uid = CharFilter(field_name="uid")
|
||||
uuid = CharFilter(field_name="uuid")
|
||||
|
||||
groups_by_name = ModelMultipleChoiceFilter(
|
||||
field_name="ak_groups__name",
|
||||
|
@ -249,7 +249,7 @@ class UserViewSet(UsedByMixin, ModelViewSet):
|
|||
queryset = User.objects.none()
|
||||
ordering = ["username"]
|
||||
serializer_class = UserSerializer
|
||||
search_fields = ["username", "name", "is_active", "email", "uid"]
|
||||
search_fields = ["username", "name", "is_active", "email", "uuid"]
|
||||
filterset_class = UsersFilter
|
||||
|
||||
def get_queryset(self): # pragma: no cover
|
||||
|
|
|
@ -3037,11 +3037,11 @@ paths:
|
|||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: uid
|
||||
name: username
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: username
|
||||
name: uuid
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
|
|
Reference in New Issue