From 85435fbf1b2140ac4a5b76a4569ae163a0662509 Mon Sep 17 00:00:00 2001 From: bot-backend Date: Fri, 3 Jul 2026 08:44:38 +0000 Subject: [PATCH] =?UTF-8?q?fix(site-finder):=20SET=20LOCAL=20=D0=BB=D0=B8?= =?UTF-8?q?=D1=82=D0=B5=D1=80=D0=B0=D0=BB=D0=BE=D0=BC=20=E2=80=94=20bind-?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=20=D0=BB=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BB=20nearby=5Fnetwork=5Fzones=20(#2283)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/services/site_finder/connection_capacity_lookup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/app/services/site_finder/connection_capacity_lookup.py b/backend/app/services/site_finder/connection_capacity_lookup.py index 60e98369..155f5494 100644 --- a/backend/app/services/site_finder/connection_capacity_lookup.py +++ b/backend/app/services/site_finder/connection_capacity_lookup.py @@ -523,10 +523,9 @@ def _query_nearby_network_zones(db: Session, parcel_wkt: str) -> list[dict]: """ try: with db.begin_nested(): - db.execute( - text("SET LOCAL statement_timeout = :ms"), - {"ms": str(_NETWORK_ZONE_TIMEOUT_MS)}, - ) + # SET не принимает bind-параметры (extended protocol → syntax error + # at or near "$1") — только литерал, как у offer_trend (parcels.py). + db.execute(text(f"SET LOCAL statement_timeout = '{_NETWORK_ZONE_TIMEOUT_MS:d}'")) rows = ( db.execute( text("""