From 45a27b01f3528d93938b5a849903a3a4b84812da Mon Sep 17 00:00:00 2001 From: Edwin Eames Date: Tue, 21 Oct 2025 22:07:32 -0400 Subject: [PATCH] Fixed commit bug in auto --- app/routers/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/routers/main.py b/app/routers/main.py index 545d6dc..7e285fb 100644 --- a/app/routers/main.py +++ b/app/routers/main.py @@ -38,12 +38,12 @@ def update_all_customer_fuel_levels(): It should be called once per day by a cron job or scheduler. """ try: - estimator = FuelEstimator() + estimator = FuelEstimator(session) result = estimator.run_daily_update() + session.commit() return result except Exception as e: session.rollback() # Log the exception e + print(str(e)) return {"ok": False, "message": "An internal error occurred."} - -