From be9a9601862165cf0582237dba0976fb8292f0e1 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 17 Nov 2023 17:03:14 +0000 Subject: [PATCH] Added default age band for new builds --- backend/Property.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/Property.py b/backend/Property.py index 1cebc4a9..259ca724 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -350,6 +350,10 @@ class Property(Definitions): self.age_band = england_wales_age_band_lookup.get(self.construction_age_band) + if (self.data["transaction-type"] == "new dwelling") and (self.age_band is None): + self.age_band = "L" + self.construction_age_band = 'England and Wales: 2012 onwards' + if self.age_band is None: raise ValueError("age_band is missing")