mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
fix: use config models when empty models list provided
When the trigger simulation API receives an empty models list ([]), it now correctly falls back to enabled models from config instead of running with no models. Changes: - Update condition to check for both None and empty list - Add test case for empty models list behavior - Update API documentation to clarify this behavior All 28 integration tests pass.
This commit is contained in:
@@ -176,11 +176,11 @@ def create_app(
|
||||
with open(config_path, 'r') as f:
|
||||
config = json.load(f)
|
||||
|
||||
if request.models is not None:
|
||||
if request.models is not None and len(request.models) > 0:
|
||||
# Use models from request (explicit override)
|
||||
models_to_run = request.models
|
||||
else:
|
||||
# Use enabled models from config
|
||||
# Use enabled models from config (when models is None or empty list)
|
||||
models_to_run = [
|
||||
model["signature"]
|
||||
for model in config.get("models", [])
|
||||
|
||||
Reference in New Issue
Block a user