diff --git a/backend/app/services/cadastre/bulk_harvest.py b/backend/app/services/cadastre/bulk_harvest.py index 58806217..173a328d 100644 --- a/backend/app/services/cadastre/bulk_harvest.py +++ b/backend/app/services/cadastre/bulk_harvest.py @@ -937,7 +937,7 @@ def upsert_zouit(db: Session, feature: NSPDBulkFeature, source: str = "search") ST_Multi( ST_Transform( ST_SetSRID(ST_GeomFromGeoJSON(CAST(:geom AS text)), 3857), - 4326, + 4326 ) ) ELSE NULL END, diff --git a/backend/app/services/job_settings.py b/backend/app/services/job_settings.py index 66b0922e..1be15f7a 100644 --- a/backend/app/services/job_settings.py +++ b/backend/app/services/job_settings.py @@ -221,7 +221,7 @@ def update( params["rate_ms"] = rate_ms if rate_ms > 0 else None if extra_config is not None: - sets.append("extra_config = :extra_config::jsonb") + sets.append("extra_config = CAST(:extra_config AS jsonb)") import json params["extra_config"] = json.dumps(extra_config, ensure_ascii=False) diff --git a/backend/app/workers/tasks/nspd_sync.py b/backend/app/workers/tasks/nspd_sync.py index af6567f1..dc7eda85 100644 --- a/backend/app/workers/tasks/nspd_sync.py +++ b/backend/app/workers/tasks/nspd_sync.py @@ -117,7 +117,7 @@ _UPSERT_SQL = text( :red_lines_count, :engineering_count, :zouit_count, :risks_count, :total_features, CAST(:features_json AS jsonb), CAST(:layers_fetched AS text[]), - :fetched_at_utc::timestamptz, + CAST(:fetched_at_utc AS timestamptz), :harvest_duration_ms, :harvest_error, :region_code