Skip to content

Commit

Permalink
feat: Attempt to fix job-access view
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Jan 22, 2025
1 parent 5eb04ea commit 3a274e2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions viewer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,7 @@ def update(self, request, code=None):
return HttpResponse(status=204)


class JobAccessView(mixins.ListModelMixin):
class JobAccessView(viewsets.GenericViewSet, mixins.ListModelMixin):
"""JobAccess (api/job_access)
Django view that calls Squonk to allow a user (who is able to see a Job)
Expand All @@ -2541,10 +2541,6 @@ class JobAccessView(mixins.ListModelMixin):
the Job 'owner', who always has access.
"""

# To satisfy the ReadOnlyModelViewSet...
queryset = models.JobRequest.objects.filter()
serializer_class = serializers.JobAccessReadSerializer

def list(self, request):
"""Method to handle a general GET request. All we do here is custom logic,
the user cannot use this endpoint to get anything, it simply provides
Expand Down

0 comments on commit 3a274e2

Please sign in to comment.