fix(22k): quartirography — use f.flat_type not f.type (column doesn't exist) #312

Merged
lekss361 merged 1 commit from fix/22k-quartirography-column into main 2026-05-17 16:09:01 +00:00

View file

@ -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-комн.'