Skip to content

Commit

Permalink
fix: missing check for no-project (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihow authored Jan 22, 2025
1 parent bfd6145 commit 14e9ec0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ami/main/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,8 @@ class StorageSourceViewSet(DefaultViewSet):
def get_queryset(self) -> QuerySet:
query_set: QuerySet = super().get_queryset()
project = get_active_project(self.request)
query_set = query_set.filter(project=project)
if project:
query_set = query_set.filter(project=project)
return query_set

@extend_schema(parameters=[project_id_doc_param])
Expand Down

0 comments on commit 14e9ec0

Please sign in to comment.