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). |
||
|---|---|---|
| .. | ||
| api | ||
| core | ||
| models | ||
| observability | ||
| schemas | ||
| scrapers | ||
| services | ||
| workers | ||
| __init__.py | ||
| main.py | ||