block: fix: .exists()
This commit is contained in:
		| @ -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) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user