Model/repositories/product
Khalim Conn-Kowlessar 53d9f21f73 fix(modelling): offer ASHP when the catalogue has no ASHP row
The ASHP bundle is priced from the rate sheet (ADR-0025); the catalogue
row is read only for its material id, which is nullable end-to-end. The
live `material` catalogue has no `air_source_heat_pump` row, so
`products.get` raised `ValueError: no active product` and aborted every
ASHP-eligible property.

Add `ProductNotFound(ValueError)` + a concrete `ProductRepository
.get_optional`, raise the typed error from both repos, and have
`_ashp_option` look the row up optionally — a missing row now yields an
ASHP Option with `material_id=None` rather than crashing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 14:55:41 +00:00
..
__init__.py feat(modelling): ProductRepository + Postgres materials-table source 2026-06-03 08:32:38 +00:00
product_json_repository.py fix(modelling): offer ASHP when the catalogue has no ASHP row 2026-06-16 14:55:41 +00:00
product_postgres_repository.py fix(modelling): offer ASHP when the catalogue has no ASHP row 2026-06-16 14:55:41 +00:00
product_repository.py fix(modelling): offer ASHP when the catalogue has no ASHP row 2026-06-16 14:55:41 +00:00