Skip to content

Commit

Permalink
Release 1.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoleoncio committed Jul 30, 2024
2 parents d311cfa + aa755af commit 32c762d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ class UsersViewSet(viewsets.ModelViewSet):
search_fields = ['user__username', 'user__email', 'display_name', 'about']
http_method_names = ['get', 'head', 'options']

def get_queryset(self):
queryset = Profile.objects.all()
username = self.request.query_params.get('username', None)
if username is not None:
queryset = queryset.filter(user__username=username)
return queryset

class ProfileViewSet(viewsets.ModelViewSet):
serializer_class = ProfileSerializer
Expand Down

0 comments on commit 32c762d

Please sign in to comment.