From 27463e3ca733a5addad775641d29ebe4154a947e Mon Sep 17 00:00:00 2001 From: Denys SAVCHENKO Date: Wed, 28 Jun 2023 16:17:34 +0200 Subject: [PATCH] more general "text_data" --- oda_api/api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oda_api/api.py b/oda_api/api.py index ee391106..a45f34bf 100644 --- a/oda_api/api.py +++ b/oda_api/api.py @@ -1281,9 +1281,8 @@ def from_response_json(cls, res_json, instrument, product): if 'text_product_list' in res_json['products'].keys(): try: - data.extend([{'name': json.loads(text_data)['name'], - 'value': json.loads(text_data)['value']} - for text_data in res_json['products']['text_product_list']]) + data.extend([json.loads(text_data) + for text_data in res_json['products']['text_product_list']]) except: data.extend([text_data for text_data in res_json['products']['text_product_list']])