Fixed commit bug in auto
This commit is contained in:
@@ -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."}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user