From 75e4d14ac8b2e3b54b9d36a3714e104d678ac1a8 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 5 Jan 2025 06:02:54 +0200 Subject: [PATCH] Finished --- cinema/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinema/views.py b/cinema/views.py index fc09b3ed..e9af43ed 100644 --- a/cinema/views.py +++ b/cinema/views.py @@ -28,11 +28,11 @@ def post(self, request): class GenreDetail(APIView): def get_object(self, pk): - return get_object_or_404(Movie, pk=pk) + return get_object_or_404(Genre, pk=pk) def get(self, request, pk): genre = self.get_object(pk) - serializer = MovieSerializer(genre) + serializer = GenreSerializer(genre) return Response(serializer.data, status=status.HTTP_200_OK) def put(self, request, pk):