mirror of https://github.com/langgenius/dify.git
fix(api): update TriggerInvokeEventResponse to use Field for default value of cancelled
This commit is contained in:
parent
49edd58722
commit
6e76f2aff2
|
|
@ -246,7 +246,7 @@ class RequestFetchAppInfo(BaseModel):
|
|||
|
||||
class TriggerInvokeEventResponse(BaseModel):
|
||||
variables: Mapping[str, Any] = Field(default_factory=dict)
|
||||
cancelled: bool | None = False
|
||||
cancelled: bool = Field(default=False)
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=(), arbitrary_types_allowed=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,9 @@ class TriggerManager:
|
|||
)
|
||||
except EventIgnoreError:
|
||||
return TriggerInvokeEventResponse(variables={}, cancelled=True)
|
||||
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
@classmethod
|
||||
def subscribe_trigger(
|
||||
cls,
|
||||
|
|
|
|||
Loading…
Reference in New Issue