From a22252a9586d46d8b37489f2126185e251d917cf Mon Sep 17 00:00:00 2001 From: Jacob Nesbitt Date: Thu, 7 Nov 2024 12:16:07 -0500 Subject: [PATCH] refactor: Remove all dataset modification endpoints --- uvdat/core/rest/dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uvdat/core/rest/dataset.py b/uvdat/core/rest/dataset.py index 81547fe8..dabcdf29 100644 --- a/uvdat/core/rest/dataset.py +++ b/uvdat/core/rest/dataset.py @@ -2,7 +2,7 @@ from rest_framework import serializers from rest_framework.decorators import action from rest_framework.response import Response -from rest_framework.viewsets import ModelViewSet +from rest_framework.viewsets import ReadOnlyModelViewSet from uvdat.core.models import Dataset, Network, NetworkEdge, NetworkNode from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission @@ -21,7 +21,7 @@ class GCCQueryParamSerializer(serializers.Serializer): exclude_nodes = serializers.RegexField(r'^\d+(,\s?\d+)*$') -class DatasetViewSet(ModelViewSet): +class DatasetViewSet(ReadOnlyModelViewSet): queryset = Dataset.objects.all() serializer_class = DatasetSerializer permission_classes = [GuardianPermission]