From 207946cad8f1b50b9bcb9a0e2f8539d335127492 Mon Sep 17 00:00:00 2001 From: Devrim Date: Thu, 12 Jan 2023 22:09:51 +0300 Subject: [PATCH] fix: jans-linux-setup conversion fails for null integer field (#3610) --- .../jans_setup/setup_app/utils/spanner_rest_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jans-linux-setup/jans_setup/setup_app/utils/spanner_rest_client.py b/jans-linux-setup/jans_setup/setup_app/utils/spanner_rest_client.py index f1bb5b40a8d..d9cffbeb4b2 100644 --- a/jans-linux-setup/jans_setup/setup_app/utils/spanner_rest_client.py +++ b/jans-linux-setup/jans_setup/setup_app/utils/spanner_rest_client.py @@ -188,7 +188,7 @@ def get_dict_data(self, sql_cmd): for row in result['rows']: row_data = {} for i, field in enumerate(result.get('metadata', {}).get('rowType', {}).get('fields', [])): - row_data[field['name']] = int(row[i]) if field['type']['code'] == 'INT64' else row[i] + row_data[field['name']] = int(row[i]) if row[i] and field['type']['code'] == 'INT64' else row[i] data.append(row_data) return data