mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
added db save
This commit is contained in:
parent
eec453670c
commit
754d46073e
1 changed files with 10 additions and 0 deletions
|
|
@ -539,6 +539,16 @@ async def trigger_plan(body: PlanTriggerRequest):
|
||||||
uprn=p.uprn
|
uprn=p.uprn
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Store the data in the database
|
||||||
|
# TODO: Rather than just doing a straight insert, we should overwrite what's already there if it exists
|
||||||
|
solar_api_client.save_to_db(
|
||||||
|
session=session,
|
||||||
|
uprns_to_location=[
|
||||||
|
{"uprn": p.uprn, "longitude": p.spatial["longitude"], "latitude": p.spatial["latitude"]}
|
||||||
|
],
|
||||||
|
scenario_type="unit"
|
||||||
|
)
|
||||||
|
|
||||||
# TODO: Insert the pitched roof area into the property class as we store the solar performance
|
# TODO: Insert the pitched roof area into the property class as we store the solar performance
|
||||||
# in the property class
|
# in the property class
|
||||||
print("Implement me")
|
print("Implement me")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue