Skip to content

Commit

Permalink
fix: roll back change to region viewset inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Sep 29, 2024
1 parent f831cf3 commit e317c6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uvdat/core/rest/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.http import HttpResponse
from drf_yasg.utils import swagger_auto_schema
from rest_framework.decorators import action
from rest_framework.viewsets import ModelViewSet
from rest_framework.viewsets import GenericViewSet, mixins

from uvdat.core.models import DerivedRegion, SourceRegion
from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission
Expand All @@ -17,15 +17,15 @@
)


class SourceRegionViewSet(ModelViewSet):
class SourceRegionViewSet(mixins.RetrieveModelMixin, mixins.ListModelMixin, GenericViewSet):
queryset = SourceRegion.objects.all()
serializer_class = SourceRegionSerializer
permission_classes = [GuardianPermission]
filter_backends = [GuardianFilter]
lookup_field = 'id'


class DerivedRegionViewSet(ModelViewSet):
class DerivedRegionViewSet(mixins.RetrieveModelMixin, mixins.ListModelMixin, GenericViewSet):
queryset = DerivedRegion.objects.all()
serializer_class = DerivedRegionListSerializer
permission_classes = [GuardianPermission]
Expand Down

0 comments on commit e317c6d

Please sign in to comment.