浏览代码

fix: list filter node url not work (#9540)

tags/0.10.0
非法操作 1年前
父节点
当前提交
53b14bde4d
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      api/core/workflow/nodes/list_operator/node.py

+ 2
- 2
api/core/workflow/nodes/list_operator/node.py 查看文件

@@ -122,7 +122,7 @@ def _get_file_extract_string_func(*, key: str) -> Callable[[File], str]:
return lambda x: x.mime_type or ""
case "transfer_method":
return lambda x: x.transfer_method
case "urL":
case "url":
return lambda x: x.remote_url or ""
case _:
raise ValueError(f"Invalid key: {key}")
@@ -249,7 +249,7 @@ def _order_string(*, order: Literal["asc", "desc"], array: Sequence[str]):


def _order_file(*, order: Literal["asc", "desc"], order_by: str = "", array: Sequence[File]):
if order_by in {"name", "type", "extension", "mime_type", "transfer_method", "urL"}:
if order_by in {"name", "type", "extension", "mime_type", "transfer_method", "url"}:
extract_func = _get_file_extract_string_func(key=order_by)
return sorted(array, key=lambda x: extract_func(x), reverse=order == "desc")
elif order_by == "size":

正在加载...
取消
保存