mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-08-03 05:18:22 +00:00
A Plan became default only when its Scenario was flagged default or the property had no Plan yet. Scenarios are created is_default=False, so in practice only the first-ever Plan was ever promoted — re-modelling a property appended a new Plan but left the default frozen on the first run, so a re-model never surfaced on the FE (property 792168 kept its 2026-07-22 scenario-1328 default through three same-scenario re-runs). Also promote when the re-run models the SAME scenario that currently owns the property's default, so a re-run refreshes the shown Plan in place (the save demotes the stale one). A re-run of a different scenario still does not hijack the default. New PlanRepository.default_plan_scenario_by_property surfaces each property's default scenario for the decision. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| comparable_properties | ||
| epc | ||
| fuel_rates | ||
| geospatial | ||
| historic_epc | ||
| hubspot_deals | ||
| landlord_overrides | ||
| magic_plan | ||
| plan | ||
| product | ||
| property | ||
| property_baseline | ||
| scenario | ||
| scenario_export | ||
| solar | ||
| spatial | ||
| tasks | ||
| unstandardised_address | ||
| uploaded_file | ||
| __init__.py | ||
| test_unit_of_work.py | ||