Skip to content

Commit

Permalink
Merge pull request #7580 from readthedocs/agj/add-remoterepo-query-param
Browse files Browse the repository at this point in the history
Add remoterepo query param
  • Loading branch information
agjohnson authored Oct 21, 2020
2 parents dbf11b5 + 74a8430 commit 50f0fd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions readthedocs/api/v2/views/model_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ class RemoteRepositoryViewSet(viewsets.ReadOnlyModelViewSet):

def get_queryset(self):
query = self.model.objects.api(self.request.user)
full_name = self.request.query_params.get('full_name')
if full_name is not None:
query = query.filter(full_name__icontains=full_name)
org = self.request.query_params.get('org', None)
if org is not None:
query = query.filter(organization__pk=org)
Expand Down

0 comments on commit 50f0fd0

Please sign in to comment.