From 3bfd6edc802de2cd290383433c559597702d0471 Mon Sep 17 00:00:00 2001
From: AndiMajore <andi.majore@googlemail.com>
Date: Fri, 4 Nov 2022 20:53:27 +0100
Subject: [PATCH] fixing max_tissue_expression route

Former-commit-id: cfe3684d9da5717b69347d5bd3f2220cd730ebf2
---
 drugstone/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drugstone/views.py b/drugstone/views.py
index 4603f6e..21e3e79 100755
--- a/drugstone/views.py
+++ b/drugstone/views.py
@@ -629,7 +629,8 @@ def query_proteins(request) -> Response:
 @api_view(['GET'])
 def get_max_tissue_expression(request) -> Response:
     tissue = Tissue.objects.get(id=request.query_params.get('tissue'))
-    return Response({max: ExpressionLevel.objects.filter(tissue=tissue).aggregate(Max('expression_level'))})
+    return Response({'max': ExpressionLevel.objects.filter(tissue=tissue).aggregate(Max('expression_level'))[
+        'expression_level__max']})
 
 
 @api_view(['POST'])
@@ -652,7 +653,6 @@ class TissueView(APIView):
         return Response(TissueSerializer(many=True).to_representation(tissues))
 
 
-
 class TissueExpressionView(APIView):
     """
     Expression of host proteins in tissues.
-- 
GitLab