mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 21:28:25 +08:00
fix(api): allow AGENT mode in workflow features validation
Add AppMode.AGENT to validate_features_structure() match case alongside ADVANCED_CHAT, fixing 'Invalid app mode: agent' error when creating Agent apps (which auto-generate a workflow draft). Discovered during E2E testing of the full create -> draft -> publish flow. Made-with: Cursor
This commit is contained in:
parent
8f3a3ea03e
commit
1835a1dc5d
@ -1418,7 +1418,7 @@ class WorkflowService:
|
||||
|
||||
def validate_features_structure(self, app_model: App, features: dict):
|
||||
match app_model.mode:
|
||||
case AppMode.ADVANCED_CHAT:
|
||||
case AppMode.ADVANCED_CHAT | AppMode.AGENT:
|
||||
return AdvancedChatAppConfigManager.config_validate(
|
||||
tenant_id=app_model.tenant_id, config=features, only_structure_validate=True
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user