fix(site-finder): SET LOCAL литералом — bind-параметр ломал nearby_network_zones (#2283)
This commit is contained in:
parent
8a42fba836
commit
85435fbf1b
1 changed files with 3 additions and 4 deletions
|
|
@ -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("""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue