diff --git a/backend/app/plan/router.py b/backend/app/plan/router.py index c1e0b981..221075f9 100644 --- a/backend/app/plan/router.py +++ b/backend/app/plan/router.py @@ -539,6 +539,16 @@ async def trigger_plan(body: PlanTriggerRequest): 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 # in the property class print("Implement me")