From 04701916c4c5ccab82ea356d4e7ad34907a8c99b Mon Sep 17 00:00:00 2001 From: cka-y Date: Fri, 30 May 2025 09:28:17 -0400 Subject: [PATCH 1/2] fix: location extraction + missing validation report --- functions-python/gbfs_validator/src/gbfs_data_processor.py | 3 +++ .../reverse_geolocation/src/reverse_geolocation_processor.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/functions-python/gbfs_validator/src/gbfs_data_processor.py b/functions-python/gbfs_validator/src/gbfs_data_processor.py index bfb47c769..91873a832 100644 --- a/functions-python/gbfs_validator/src/gbfs_data_processor.py +++ b/functions-python/gbfs_validator/src/gbfs_data_processor.py @@ -368,6 +368,9 @@ def create_validation_report_entities( validation_report_url = validation_report_data.get("report_summary_url") validation_report_json = validation_report_data.get("json_report_summary") validation_time = validation_report_data.get("validation_time") + if not validation_report_url: + self.logger.error("Validation report doesn't exist") + return None validator_version = validation_report_json.get("summary", {}).get( "validatorVersion", None diff --git a/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py b/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py index 3a1dda9bc..95e05673e 100644 --- a/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py +++ b/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py @@ -178,6 +178,8 @@ def extract_location_aggregate( group_name=", ".join([g.name for g in geopolygons]), osms=geopolygons, ) + db_session.add(group) + db_session.flush() # Ensure the group is added before using it stop = ( db_session.query(Feedlocationgrouppoint) .filter( From e68ed34258d9f685cfece5c0c7421c2c173bcf50 Mon Sep 17 00:00:00 2001 From: cka-y Date: Fri, 30 May 2025 09:30:27 -0400 Subject: [PATCH 2/2] fix: lint --- .../reverse_geolocation/src/reverse_geolocation_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py b/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py index 95e05673e..430776197 100644 --- a/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py +++ b/functions-python/reverse_geolocation/src/reverse_geolocation_processor.py @@ -179,7 +179,7 @@ def extract_location_aggregate( osms=geopolygons, ) db_session.add(group) - db_session.flush() # Ensure the group is added before using it + db_session.flush() # Ensure the group is added before using it stop = ( db_session.query(Feedlocationgrouppoint) .filter(