Skip to content
Snippets Groups Projects
Commit ccd0f7f6 authored by AndiMajore's avatar AndiMajore
Browse files

fixing max_tissue_expression route

Former-commit-id: 9ad25fce42fe06dc99e88bf0590f8ef4db6031ef [formerly be94ed3c40897da95602622f3b42f1ab36d3591d]
Former-commit-id: d78d98e869e73cd7a9ec48bf29f0d9a03076f509
parent 2cd18548
Branches
No related tags found
No related merge requests found
...@@ -629,7 +629,8 @@ def query_proteins(request) -> Response: ...@@ -629,7 +629,8 @@ def query_proteins(request) -> Response:
@api_view(['GET']) @api_view(['GET'])
def get_max_tissue_expression(request) -> Response: def get_max_tissue_expression(request) -> Response:
tissue = Tissue.objects.get(id=request.query_params.get('tissue')) 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']) @api_view(['POST'])
...@@ -652,7 +653,6 @@ class TissueView(APIView): ...@@ -652,7 +653,6 @@ class TissueView(APIView):
return Response(TissueSerializer(many=True).to_representation(tissues)) return Response(TissueSerializer(many=True).to_representation(tissues))
class TissueExpressionView(APIView): class TissueExpressionView(APIView):
""" """
Expression of host proteins in tissues. Expression of host proteins in tissues.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment