From c83fbb789a43e608878c93ff11d2acc8c639cc0d Mon Sep 17 00:00:00 2001 From: sunxiaojia123 <85338343+sunxiaojia123@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:50:38 +0800 Subject: [PATCH] fix: The url output by the list_operator is null The url can be output in the first or last data obtained by list_operator. After reference, url is not a field of File model, but a field processed by self.generate_url(). However, the code uses the direct output of remote_url, which is often an incomplete field or null, so it is more reasonable to replace it with a field generated by generate_url() --- api/core/workflow/nodes/list_operator/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/workflow/nodes/list_operator/node.py b/api/core/workflow/nodes/list_operator/node.py index 79066cece4..18d3f8007d 100644 --- a/api/core/workflow/nodes/list_operator/node.py +++ b/api/core/workflow/nodes/list_operator/node.py @@ -176,7 +176,7 @@ def _get_file_extract_string_func(*, key: str) -> Callable[[File], str]: case "transfer_method": return lambda x: x.transfer_method case "url": - return lambda x: x.remote_url or "" + return lambda x: x.generate_url() or "" case _: raise InvalidKeyError(f"Invalid key: {key}")