feat: add webhook node limit validation (max 5 per workflow)

- Add MAX_WEBHOOK_NODES_PER_WORKFLOW constant set to 5
- Validate webhook node count in sync_webhook_relationships method
- Raise ValueError when workflow exceeds webhook node limit
- Block workflow save when limit is exceeded to ensure data integrity
- Provide clear error message indicating current count and maximum allowed

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yeuoly
2025-09-10 17:22:09 +08:00
parent b0f1e55a87
commit 9898730cc5
3 changed files with 16 additions and 2 deletions

View File

@ -167,7 +167,7 @@ class AppTriggersApi(Resource):
"""Get app triggers list"""
assert isinstance(current_user, Account)
assert current_user.current_tenant_id is not None
with Session(db.engine) as session:
# Get all triggers for this app using select API
triggers = (