From fd2b09b8062d278e0197f774ce243a864033fcdf Mon Sep 17 00:00:00 2001 From: lekss361 Date: Sun, 17 May 2026 16:09:00 +0000 Subject: [PATCH] =?UTF-8?q?fix(22k):=20quartirography=20=E2=80=94=20use=20?= =?UTF-8?q?f.flat=5Ftype=20not=20f.type=20(column=20doesn't=20exist)=20(#3?= =?UTF-8?q?12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/analytics_queries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/services/analytics_queries.py b/backend/app/services/analytics_queries.py index 2ea75ba5..7276babb 100644 --- a/backend/app/services/analytics_queries.py +++ b/backend/app/services/analytics_queries.py @@ -985,8 +985,8 @@ def object_flats_quartirography(db: Session, obj_id: int) -> list[dict[str, Any] ) SELECT CASE - WHEN f.rooms IS NULL OR LOWER(f.type) LIKE '%нежил%' - OR LOWER(f.type) LIKE '%nonliv%' THEN 'Нежилые' + WHEN f.rooms IS NULL OR LOWER(f.flat_type) LIKE '%нежил%' + OR LOWER(f.flat_type) LIKE '%nonliv%' THEN 'Нежилые' WHEN f.rooms = 0 THEN 'Студия' WHEN f.rooms = 1 THEN '1-комн.' WHEN f.rooms = 2 THEN '2-комн.'