mirror of https://github.com/langgenius/dify.git
fix(api): fix Optional not defined (#25857)
This commit is contained in:
commit
4fd2f605ba
|
|
@ -100,7 +100,7 @@ class DatasourceFileMessageTransformer:
|
|||
)
|
||||
elif message.type == DatasourceMessage.MessageType.FILE:
|
||||
meta = message.meta or {}
|
||||
file: Optional[File] = meta.get("file")
|
||||
file: File | None = meta.get("file")
|
||||
if isinstance(file, File):
|
||||
if file.transfer_method == FileTransferMethod.TOOL_FILE:
|
||||
assert file.related_id is not None
|
||||
|
|
|
|||
Loading…
Reference in New Issue