mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 16:26:02 +00:00
end
This commit is contained in:
@@ -5,6 +5,7 @@ Node metadata is loaded from: ../../templates/metadata/nodes/event_trigger.yaml
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from langbot_plugin.api.entities.builtin.workflow import ExecutionContext
|
||||
@@ -17,9 +18,8 @@ class EventTriggerNode(WorkflowNode):
|
||||
category = 'trigger'
|
||||
|
||||
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
|
||||
from datetime import datetime
|
||||
|
||||
trigger_data = context.trigger_data
|
||||
# Safe access to trigger_data which may be None
|
||||
trigger_data = context.trigger_data or {}
|
||||
|
||||
return {
|
||||
'event_type': trigger_data.get('event_type', ''),
|
||||
|
||||
Reference in New Issue
Block a user