fix(#112): competitors avg_price_per_m2 всегда None — убран WHERE status='sold' #228

Merged
lekss361 merged 1 commit from fix/issue112-sold-filter-avg-price into main 2026-05-16 19:52:45 +00:00

1 commit

Author SHA1 Message Date
lekss361
31581cedd2 fix(#112): remove broken status='sold' filter from competitors avg_price query
domrf_kn_flats.status is NULL in ~99.8% of rows, so WHERE status='sold'
always returned 0 rows and avg_price_per_m2 was always None. Drop the
filter; AVG over all rows with price_per_m2 IS NOT NULL is semantically
correct for a complex-level price estimate.

Adds regression test test_competitors_avg_price_populated (Issue #227).
2026-05-16 22:46:10 +03:00