gendesign/tradein-mvp/backend/app
lekss361 3ce76b4beb fix(tradein): floor/total_floors NULL — migration + PDF defaults
Bot review #558 нашёл 🔴: trade_in_estimates.floor/total_floors имеют
NOT NULL constraint в DDL (001_trade_in_estimates.sql) — INSERT в
estimator.py:893 и _empty_estimate шлют payload.floor=None →
psycopg.errors.NotNullViolation на user-submit без этажа.

- new migration 065: DROP NOT NULL для обеих колонок (idempotent)
- PDF exporter: fallback "—" вместо "0" при missing floor/total_floors
- estimator.py:744 style: `is not None` для consistency с pre-call gates
- integration test: estimate без floor не крашится

Bot reviewer ⚠️ findings addressed:
🔴 NOT NULL DB violation — FIXED via migration 065
🟠 PDF "0 / 0" regression — FIXED via or "—"
🟡 style inconsistency — FIXED
🟢 test coverage gap — FIXED via test_estimator_floor_optional.py
2026-05-25 00:36:49 +03:00
..
api feat(tradein): GET /street-deals — ДКП-сделки Росреестра по улице target адреса (#555) 2026-05-24 20:05:48 +00:00
core feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
schemas feat(tradein): этаж/этажность optional + best test presets по deal count 2026-05-25 00:20:08 +03:00
services fix(tradein): floor/total_floors NULL — migration + PDF defaults 2026-05-25 00:36:49 +03:00
tasks feat(tradein/cian): valuation backfill + runner script для prod (#539) 2026-05-24 15:16:45 +00:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00