Skip to content
Snippets Groups Projects
Commit 91962105 authored by Hartung, Michael's avatar Hartung, Michael
Browse files

tissue expression request to POST to allow longer lists of proteins

parent c1d7e66b
No related branches found
No related tags found
No related merge requests found
...@@ -637,15 +637,15 @@ class TissueExpressionView(APIView): ...@@ -637,15 +637,15 @@ class TissueExpressionView(APIView):
Expression of host proteins in tissues. Expression of host proteins in tissues.
""" """
def get(self, request) -> Response: def post(self, request) -> Response:
tissue = Tissue.objects.get(id=request.query_params.get('tissue')) tissue = Tissue.objects.get(id=request.data.get('tissue'))
if request.query_params.get('proteins'): if request.data.get('proteins'):
ids = json.loads(request.query_params.get('proteins')) ids = json.loads(request.data.get('proteins'))
proteins = list(Protein.objects.filter(id__in=ids).all()) proteins = list(Protein.objects.filter(id__in=ids).all())
elif request.query_params.get('token'): elif request.data.get('token'):
proteins = [] proteins = []
task = Task.objects.get(token=request.query_params['token']) task = Task.objects.get(token=request.data['token'])
result = task_result(task) result = task_result(task)
network = result['network'] network = result['network']
node_attributes = result.get('node_attributes') node_attributes = result.get('node_attributes')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment