Skip to content

Commit

Permalink
fix: Attempt to fix JR view
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Jan 21, 2025
1 parent 53c6acd commit 0415915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions viewer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,15 +2100,15 @@ 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']:
return serializers.JobRequestReadSerializer
# (POST, PUT, PATCH)
return serializers.JobRequestWriteSerializer

def get(self, request):
def list(self, request):
logger.info('+ JobRequestView.get')

user = self.request.user
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0415915

Please sign in to comment.