Sfoglia il codice sorgente

refactor(list_operator): replace ValueError with InvalidKeyError (#10222)

tags/0.11.0
-LAN- 1 anno fa
parent
commit
9369cc44e6
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      api/core/workflow/nodes/list_operator/node.py

+ 1
- 1
api/core/workflow/nodes/list_operator/node.py Vedi File

@@ -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…
Annulla
Salva