Skip to content

Commit 207946c

Browse files
authored
fix: jans-linux-setup conversion fails for null integer field (#3610)
1 parent e4d1d0c commit 207946c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jans-linux-setup/jans_setup/setup_app/utils/spanner_rest_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def get_dict_data(self, sql_cmd):
188188
for row in result['rows']:
189189
row_data = {}
190190
for i, field in enumerate(result.get('metadata', {}).get('rowType', {}).get('fields', [])):
191-
row_data[field['name']] = int(row[i]) if field['type']['code'] == 'INT64' else row[i]
191+
row_data[field['name']] = int(row[i]) if row[i] and field['type']['code'] == 'INT64' else row[i]
192192
data.append(row_data)
193193

194194
return data

0 commit comments

Comments
 (0)