From 04159155a456ec59555ca4466542cedc5bbb89fb Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Tue, 21 Jan 2025 16:35:46 +0000 Subject: [PATCH] fix: Attempt to fix JR view --- viewer/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/viewer/views.py b/viewer/views.py index 41149c7d..1a5cdf19 100644 --- a/viewer/views.py +++ b/viewer/views.py @@ -2100,7 +2100,7 @@ def create(self, request): class JobRequestView(viewsets.ModelViewSet): - queryset = models.JobFileTransfer.objects.filter() + queryset = models.JobRequest.objects.filter() def get_serializer_class(self): if self.request.method in ['GET']: @@ -2108,7 +2108,7 @@ def get_serializer_class(self): # (POST, PUT, PATCH) return serializers.JobRequestWriteSerializer - def get(self, request): + def list(self, request): logger.info('+ JobRequestView.get') user = self.request.user @@ -2208,7 +2208,7 @@ def get(self, request): } return Response(content, status=status.HTTP_200_OK) - def post(self, request): + def create(self, request): logger.info('+ JobRequestView.post') # Only authenticated users can create squonk job requests # (unless 'AUTHENTICATE_UPLOAD' is False in settings.py)