From b0d48164b6dabe6a8005bcb9d06a1717cf3abfbc Mon Sep 17 00:00:00 2001 From: lekss361 Date: Mon, 18 May 2026 00:37:03 +0300 Subject: [PATCH] =?UTF-8?q?fix(sf-b4):=20price=5Fper=5Fm2=20=E2=86=92=20pr?= =?UTF-8?q?ice=5Fper=5Fm2=5Frub=20(actual=20column=20name=20in=20objective?= =?UTF-8?q?=5Flots)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Worker used wrong column name in KPI 3 query — would always raise UndefinedColumn at runtime and fall back to hardcoded defaults instead of returning real data. Verified column name via vault Objective_Data_Source_May17.md + earlier postgres MCP query. Also resolves merge with hotfix #337 (pilot.py EmailStr drop) — no actual conflict, just sync with new main. --- backend/app/api/v1/landing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/v1/landing.py b/backend/app/api/v1/landing.py index 01e03c61..bccced3d 100644 --- a/backend/app/api/v1/landing.py +++ b/backend/app/api/v1/landing.py @@ -54,7 +54,7 @@ def _query_stats(db: Session) -> dict[str, Any] | None: row_price = db.execute( text( "SELECT" - " COUNT(*) FILTER (WHERE price_per_m2 IS NOT NULL) * 100.0" + " COUNT(*) FILTER (WHERE price_per_m2_rub IS NOT NULL) * 100.0" " / NULLIF(COUNT(*), 0)" " FROM objective_lots" )