mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
restviews: explicitly use ReadOnlyModelViewSet
The entire API is meant to be read-only, so we should be using this class instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
a0396ebec7
commit
4736d14327
|
@ -2,7 +2,7 @@ from layerindex.models import Branch, LayerItem, LayerNote, LayerBranch, LayerDe
|
|||
from rest_framework import viewsets, serializers
|
||||
from layerindex.querysethelper import params_to_queryset, get_search_tuple
|
||||
|
||||
class ParametricSearchableModelViewSet(viewsets.ModelViewSet):
|
||||
class ParametricSearchableModelViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
def get_queryset(self):
|
||||
model = self.__class__.serializer_class.Meta.model
|
||||
qs = self.queryset
|
||||
|
|
Loading…
Reference in New Issue
Block a user