Fixed commit bug in auto

This commit is contained in:
2025-10-21 22:07:32 -04:00
parent 5b1932f819
commit 45a27b01f3

View File

@@ -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."}