mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
overwrite solar and solar scenario storage to db instead of creating a new record
This commit is contained in:
parent
c693c6a633
commit
ef6aad6425
2 changed files with 0 additions and 5 deletions
|
|
@ -192,8 +192,6 @@ class GoogleSolarApi:
|
|||
if not self.need_to_store:
|
||||
return
|
||||
|
||||
logger.info("Storing to database")
|
||||
|
||||
scenarios_data = self.panel_performance.head(1)[
|
||||
[
|
||||
"n_panels",
|
||||
|
|
@ -221,7 +219,6 @@ class GoogleSolarApi:
|
|||
scenarios_data["scenario_type"] = scenario_type
|
||||
scenarios_data = scenarios_data.to_dict(orient="records")
|
||||
|
||||
# TODO: Rather than just doing a straight insert, we should overwrite what's already there if it exists
|
||||
store_batch_data(
|
||||
session=session,
|
||||
api_data=self.insights_data,
|
||||
|
|
|
|||
|
|
@ -651,8 +651,6 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
)
|
||||
|
||||
# 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=[
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue