Skip to content

Commit

Permalink
fix: The url output by the list_operator is null
Browse files Browse the repository at this point in the history
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()
  • Loading branch information
sunxiaojia123 authored Nov 12, 2024
1 parent 6264244 commit c83fbb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/workflow/nodes/list_operator/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down

0 comments on commit c83fbb7

Please sign in to comment.