From 5bd4f1932ce338e20b79b306c693be741bc36ccb Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Tue, 19 Dec 2023 09:59:52 -0500 Subject: [PATCH] Remove unused imports and fix style --- api/cedar_metadata_templates/views.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/api/cedar_metadata_templates/views.py b/api/cedar_metadata_templates/views.py index 9af1ea24fa95..73bdca565af5 100644 --- a/api/cedar_metadata_templates/views.py +++ b/api/cedar_metadata_templates/views.py @@ -4,21 +4,17 @@ from rest_framework import permissions as drf_permissions from rest_framework.exceptions import NotFound +from api.base import permissions as base_permissions from api.base.filters import ListFilterMixin -# from api.base.parsers import ( -# JSONAPIMultipleRelationshipsParser, -# JSONAPIMultipleRelationshipsParserForRegularJSON, -# ) from api.base.versioning import PrivateVersioning from api.base.views import JSONAPIBaseView -from api.base import permissions as base_permissions -# from api.base.utils import get_user_auth from api.cedar_metadata_templates.serializers import CedarMetadataTemplateSerializer from framework.auth.oauth_scopes import CoreScopes from osf.models import CedarMetadataTemplate class CedarMetadataTemplateList(JSONAPIBaseView, generics.ListAPIView, ListFilterMixin): + permission_classes = ( drf_permissions.IsAuthenticatedOrReadOnly, base_permissions.TokenHasScope, @@ -40,7 +36,9 @@ def get_default_queryset(self): def get_queryset(self): return self.get_queryset_from_request() + class CedarMetadataTemplateDetail(JSONAPIBaseView, generics.RetrieveAPIView): + permission_classes = ( drf_permissions.IsAuthenticatedOrReadOnly, base_permissions.TokenHasScope,