diff --git a/profiles/views.py b/profiles/views.py index 06b5f0c..e32a8cf 100644 --- a/profiles/views.py +++ b/profiles/views.py @@ -12,7 +12,7 @@ class BlockView(APIView): def get(self, request, pk): block = BlockModel.objects.filter(pk=pk) - if (block): + if (block.exists()): return Response(serializers.serialize("json", block), status=status.HTTP_200_OK) else: return Response("Not Found", status=status.HTTP_404_NOT_FOUND)