fix: Users api options request 404

pull/16003/head
wangruidong 2025-09-11 10:17:05 +08:00
parent ab908d24a7
commit 390d3642f5
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class UserViewSet(CommonApiMixin, UserQuerysetMixin, SuggestionMixin, BulkModelV
def get_object(self):
pk = self.kwargs.get(self.lookup_field)
if not is_uuid(pk):
if pk and not is_uuid(pk):
return self.get_queryset().get(username=pk)
return super().get_object()