diff options
author | 2018-09-04 22:06:07 +0200 | |
---|---|---|
committer | 2018-09-04 22:06:07 +0200 | |
commit | e211cbf6dbbe3a28ef1276af69c4f387db52d596 (patch) | |
tree | 8bb441e8528056806e129c5d45b3770bbaa0fd31 /api/viewsets.py | |
parent | Add job tags. (diff) |
Set up GitLab CI properly.
Diffstat (limited to 'api/viewsets.py')
-rw-r--r-- | api/viewsets.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/api/viewsets.py b/api/viewsets.py index 677110a8..9eec3a03 100644 --- a/api/viewsets.py +++ b/api/viewsets.py @@ -1,6 +1,9 @@ from django.shortcuts import get_object_or_404 from rest_framework.exceptions import ParseError -from rest_framework.mixins import CreateModelMixin, DestroyModelMixin, ListModelMixin, RetrieveModelMixin +from rest_framework.mixins import ( + CreateModelMixin, DestroyModelMixin, + ListModelMixin, RetrieveModelMixin +) from rest_framework.response import Response from rest_framework.status import HTTP_201_CREATED from rest_framework.viewsets import GenericViewSet, ModelViewSet, ViewSet @@ -144,7 +147,7 @@ class OffTopicChannelNameViewSet(DestroyModelMixin, ViewSet): 'name': ["This query parameter is required."] }) - def list(self, request): + def list(self, request): # noqa if 'random_items' in request.query_params: param = request.query_params['random_items'] try: @@ -204,7 +207,7 @@ class SnakeNameViewSet(ViewSet): def get_queryset(self): return SnakeName.objects.all() - def list(self, request): + def list(self, request): # noqa if request.query_params.get('get_all'): queryset = self.get_queryset() serialized = self.serializer_class(queryset, many=True) |