From 57d38ba89335ce9d838af6962b5ca39d1ea1e068 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Thu, 5 Oct 2023 00:42:07 +0200 Subject: [PATCH] Update reverse geocode, fix error on invalid geocode --- initdb/02_3_3_signalk_public_functions_py.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initdb/02_3_3_signalk_public_functions_py.sql b/initdb/02_3_3_signalk_public_functions_py.sql index 9486c5b..9740908 100644 --- a/initdb/02_3_3_signalk_public_functions_py.sql +++ b/initdb/02_3_3_signalk_public_functions_py.sql @@ -77,7 +77,7 @@ AS $reverse_geocode_py$ else: plpy.warning('Failed to received a geo full address %s', r.json()) #plpy.error('Failed to received a geo full address %s', r.json()) - return { "name": "unknown", "country_code": country_code } + return { "name": "unknown", "country_code": "unknown" } $reverse_geocode_py$ TRANSFORM FOR TYPE jsonb LANGUAGE plpython3u; -- Description