diff options
author | 2021-11-05 10:56:34 +0530 | |
---|---|---|
committer | 2021-11-05 10:56:34 +0530 | |
commit | 6e1d38d6ceb97f287f0d347e974bc795dda38ffe (patch) | |
tree | 540804d08854536fbf15050570e3fd1942607542 /pydis_site/apps/api/viewsets | |
parent | Eliminate usage of typing module and update docstrings. (diff) |
Use framework defination of method.
Diffstat (limited to 'pydis_site/apps/api/viewsets')
-rw-r--r-- | pydis_site/apps/api/viewsets/bot/off_topic_channel_name.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/off_topic_channel_name.py b/pydis_site/apps/api/viewsets/bot/off_topic_channel_name.py index 7151d29b..27eabec9 100644 --- a/pydis_site/apps/api/viewsets/bot/off_topic_channel_name.py +++ b/pydis_site/apps/api/viewsets/bot/off_topic_channel_name.py @@ -70,7 +70,7 @@ class OffTopicChannelNameViewSet(ModelViewSet): def get_queryset(self, **kwargs) -> QuerySet: """Returns a queryset that covers the entire OffTopicChannelName table.""" - return OffTopicChannelName.objects.filter(**kwargs) + return OffTopicChannelName.objects.all() def create(self, request: Request, *args, **kwargs) -> Response: """ @@ -137,6 +137,6 @@ class OffTopicChannelNameViewSet(ModelViewSet): if active_param := request.query_params.get("active"): params["active"] = active_param.lower() == "true" - queryset = self.get_queryset(**params) + queryset = self.get_queryset().filter(**params) serialized = self.serializer_class(queryset, many=True) return Response(serialized.data) |