diff --git a/tradein-mvp/backend/app/services/brand.py b/tradein-mvp/backend/app/services/brand.py index 370ff9f7..9d2ac093 100644 --- a/tradein-mvp/backend/app/services/brand.py +++ b/tradein-mvp/backend/app/services/brand.py @@ -28,7 +28,7 @@ class Brand: _DEFAULT = Brand( slug="generic", - name="Trade-In Estimator", + name="МЕРА", logo_url=None, primary_color="#1d4ed8", accent_color="#f59e0b", diff --git a/tradein-mvp/backend/app/services/exporters/trade_in_pdf.py b/tradein-mvp/backend/app/services/exporters/trade_in_pdf.py index 6e46660d..08cb4ac3 100644 --- a/tradein-mvp/backend/app/services/exporters/trade_in_pdf.py +++ b/tradein-mvp/backend/app/services/exporters/trade_in_pdf.py @@ -1086,16 +1086,14 @@ def _build_cover(estimate: AggregatedEstimate, input_snapshot: dict, brand) -> s house_label = house_labels.get(house_type, "—") if house_type else "—" repair_label = repair_labels.get(repair_state, "Не указано") if repair_state else "Не указано" balcony_label = "Есть" if has_balcony else "Нет" if has_balcony is False else "—" + # #pdf-none: year_built может быть None (адрес без house_metadata) — раньше в + # таблицу утекало литеральное «None»; показываем «—» как в остальных пустых полях. + year_label = _mono(str(year_built)) if year_built else "—" # Срок экспозиции показываем ТОЛЬКО при реальных days_on_market в analogs; # если данных нет — days не рисуем (не выдумываем «4-118 дней», #pdf-honesty). days_range = _days_on_market_range(estimate.analogs) - # Deals range — если deals есть, считаем; иначе fallback к listings range - deals_low, deals_high = _deals_range( - estimate.actual_deals, fallback=(estimate.range_low_rub, estimate.range_high_rub) - ) - listings_bar = _price_range_chart_svg( estimate.range_low_rub, estimate.range_high_rub, @@ -1121,12 +1119,6 @@ def _build_cover(estimate: AggregatedEstimate, input_snapshot: dict, brand) -> s "Росреестр, ДомКлик и продажи агентств недвижимости" ) - deals_bar = _price_range_chart_svg( - deals_low, - deals_high, - sub_label="Диапазон цен по фактическим сделкам", - ) - disclaimer_html = "" if brand.pdf_disclaimer: disclaimer_html = ( @@ -1160,7 +1152,7 @@ def _build_cover(estimate: AggregatedEstimate, input_snapshot: dict, brand) -> s
- Диапазон цен по фактическим сделкам -
- {deals_bar} -