From 420057aa02c1c490fb973b15d47db6406dd73fa5 Mon Sep 17 00:00:00 2001 From: Light1YT Date: Fri, 22 May 2026 16:01:12 +0500 Subject: [PATCH] =?UTF-8?q?fix(tradein):=20PDF=20=E2=80=94=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=87=D0=B0=D1=8F=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=20=D0=BE=D1=82=D1=87=D1=91=D1=82=20+=20?= =?UTF-8?q?=C2=AB=D0=95=D1=81=D1=82=D1=8C/=D0=9D=D0=B5=D1=82=C2=BB=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B1=D0=B0=D0=BB=D0=BA=D0=BE=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit «Этот отчёт онлайн» и QR-код в PDF вели на gendsgn.ru/trade-in/trade-in?id=… — двойной /trade-in/: PUBLIC_URL на проде уже = https://gendsgn.ru/trade-in, а код добавлял /trade-in ещё раз → ссылка/QR давали 404. Плюс «Балкон / лоджия» печатался как «1»/«0» (сырое булево) вместо «Есть»/«Нет». --- tradein-mvp/backend/app/services/exporters/trade_in_pdf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 f7d0ac98..d68f68c9 100644 --- a/tradein-mvp/backend/app/services/exporters/trade_in_pdf.py +++ b/tradein-mvp/backend/app/services/exporters/trade_in_pdf.py @@ -244,7 +244,7 @@ def _build_cover( rooms_label = "Студия" if rooms == 0 else f"{rooms} комнат" + ("а" if rooms == 1 else "ы" if 2 <= rooms <= 4 else "") house_label = house_labels.get(house_type, "—") if house_type else "—" repair_label = repair_labels.get(repair_state, "Не указано") if repair_state else "Не указано" - balcony_label = "1" if has_balcony else "0" if has_balcony is False else "—" + balcony_label = "Есть" if has_balcony else "Нет" if has_balcony is False else "—" # Active market subband — 4-118 days range (как у Брусники). # Если есть days_on_market в analogs — берём min/max, иначе фиксированно. @@ -269,7 +269,7 @@ def _build_cover( ) qr_url = _qr_code_data_url( - f"{settings.public_url}/trade-in?id={estimate.estimate_id}", size=3 + f"{settings.public_url}?id={estimate.estimate_id}", size=3 ) return f""" @@ -332,7 +332,7 @@ def _build_cover(

- Этот отчёт онлайн: {settings.public_url}/trade-in?id={estimate.estimate_id} + Этот отчёт онлайн: {settings.public_url}?id={estimate.estimate_id}