From 1bc4b18e552817baf0eaf832b84c098583a8925b Mon Sep 17 00:00:00 2001 From: altrix-one Date: Tue, 19 Aug 2025 13:05:56 +0000 Subject: [PATCH] Fix f-string related error --- ai_inventory/ai_accounts_forecast/models/account_forecast.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ai_inventory/ai_accounts_forecast/models/account_forecast.py b/ai_inventory/ai_accounts_forecast/models/account_forecast.py index c72f183..36c7212 100644 --- a/ai_inventory/ai_accounts_forecast/models/account_forecast.py +++ b/ai_inventory/ai_accounts_forecast/models/account_forecast.py @@ -34,7 +34,10 @@ def create_financial_forecast( # Validate forecast type valid_types = ["Cash Flow", "Revenue", "Expense", "Balance Sheet", "P&L"] if forecast_type not in valid_types: - raise ValueError(f"Forecast Type cannot be \"{forecast_type}\". It should be one of {', '.join(f'\"{t}\"' for t in valid_types)}") + raise ValueError( + f'Forecast Type cannot be "{forecast_type}". ' + f"It should be one of {', '.join(map(repr, valid_types))}" + ) try: # Get account details