diff --git a/backend/motorsignal_api/app/road_alerts/cache.py b/backend/motorsignal_api/app/road_alerts/cache.py index 5de6fc7..161c3dc 100644 --- a/backend/motorsignal_api/app/road_alerts/cache.py +++ b/backend/motorsignal_api/app/road_alerts/cache.py @@ -308,7 +308,7 @@ class PersistentUsageTracker: stmt = text(""" UPDATE provider_monthly_usage SET requests_executed = requests_executed + 1, - estimated_cost_usd = round((requests_executed + 1) * :cost_per_req, 4), + estimated_cost_usd = round(CAST((requests_executed + 1) * :cost_per_req AS numeric), 4), updated_at = :now WHERE provider_id = :provider_id AND period_month = :period """)