-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
lib/workload/stateless/stacks/sequence-run-manager/sequence_run_manager/viewsets/state.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
from rest_framework.viewsets import GenericViewSet | ||
from rest_framework import mixins | ||
|
||
from sequence_run_manager.models.state import State | ||
from sequence_run_manager.serializers.state import StateSerializer | ||
|
||
|
||
class StateViewSet(GenericViewSet): | ||
class StateViewSet(mixins.ListModelMixin, GenericViewSet): | ||
serializer_class = StateSerializer | ||
search_fields = State.get_base_fields() | ||
orcabus_id_prefix = State.orcabus_id_prefix | ||
http_method_names = ['get'] | ||
pagination_class = None | ||
|
||
def get_queryset(self): | ||
return State.objects.filter(sequence=self.kwargs["orcabus_id"]) | ||
|