mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
deugging null lodgement-date
This commit is contained in:
parent
807ce14790
commit
69dcc73363
1 changed files with 5 additions and 1 deletions
|
|
@ -609,7 +609,11 @@ class SearchEpc:
|
|||
# Insert an estimated lodgement datetime, with a weighted average
|
||||
estimated_epc["lodgement-datetime"] = self.calculate_weighted_lodgement_datetime(epc_data=epc_data)
|
||||
# Extract logement date
|
||||
estimated_epc["lodgement-date"] = estimated_epc["lodgement-datetime"].strftime("%Y-%m-%d")
|
||||
# It is possible that there is still no lodgement date, so we need to handle this
|
||||
if pd.isnull(estimated_epc["lodgement-datetime"]):
|
||||
estimated_epc["lodgement-date"] = None
|
||||
else:
|
||||
estimated_epc["lodgement-date"] = estimated_epc["lodgement-datetime"].strftime("%Y-%m-%d")
|
||||
|
||||
estimated_epc["postcode"] = self.postcode
|
||||
estimated_epc["uprn"] = self.uprn
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue