When no comps/anchor are found the estimate returns median=0/range 0-0, and the frontend can render a literal «0 ₽». Add a computed boolean insufficient_data (= median_price_rub <= 0) so the UI shows an explicit «недостаточно данных» state instead. Implemented as a Pydantic @computed_field derived from median_price_rub — correct automatically across all four AggregatedEstimate construction sites (main estimate, _empty_estimate, and both GET-rehydration paths), no DB column, no risk of per-site drift. Additive/serialized; existing fields untouched. Refs #697 |
||
|---|---|---|
| .. | ||
| api | ||
| core | ||
| observability | ||
| schemas | ||
| services | ||
| tasks | ||
| __init__.py | ||
| main.py | ||