From 95f25050658ed24dc99bf22c0db39b6bea53bcef Mon Sep 17 00:00:00 2001 From: maxsibilla Date: Wed, 30 Aug 2023 16:14:18 -0400 Subject: [PATCH] Updating search api call to to url encode the assaytype as memcache requires its keys to not contain spaces --- src/schema/schema_triggers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/schema/schema_triggers.py b/src/schema/schema_triggers.py index 4ee49edf..236e6a9e 100644 --- a/src/schema/schema_triggers.py +++ b/src/schema/schema_triggers.py @@ -1,6 +1,8 @@ import os import ast import json +import urllib + import yaml import logging import datetime @@ -2263,7 +2265,7 @@ def _get_assay_type_description(data_types): for data_type in data_types: # The assaytype endpoint in search-api is public accessible, no token needed - search_api_target_url = schema_manager.get_search_api_url() + f"/assaytype/{data_type}" + search_api_target_url = schema_manager.get_search_api_url() + f"/assaytype/{urllib.parse.quote(data_type)}" # Function cache to improve performance response = schema_manager.make_request_get(search_api_target_url)