mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 06:49:03 +08:00
refactor(list_operator): replace ValueError with InvalidKeyError (#10222)
This commit is contained in:
parent
38bca6731c
commit
9369cc44e6
@ -295,4 +295,4 @@ def _order_file(*, order: Literal["asc", "desc"], order_by: str = "", array: Seq
|
||||
extract_func = _get_file_extract_number_func(key=order_by)
|
||||
return sorted(array, key=lambda x: extract_func(x), reverse=order == "desc")
|
||||
else:
|
||||
raise ValueError(f"Invalid order key: {order_by}")
|
||||
raise InvalidKeyError(f"Invalid order key: {order_by}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user