fix(site-finder): SET LOCAL литералом — bind-параметр ломал nearby_network_zones (#2283)
All checks were successful
Deploy / changes (push) Successful in 8s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 1m57s
Deploy / build-worker (push) Successful in 3m3s
Deploy / deploy (push) Successful in 1m47s

This commit is contained in:
bot-backend 2026-07-03 08:44:38 +00:00
parent 8a42fba836
commit 85435fbf1b

View file

@ -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("""