fix: add backward compatibility for 5 item filter (#28678)
This commit is contained in:
parent
eb6260c1c3
commit
6e02bfedcd
2 changed files with 10 additions and 1 deletions
2
.github/workflows/_base-migration.yml
vendored
2
.github/workflows/_base-migration.yml
vendored
|
|
@ -103,7 +103,7 @@ jobs:
|
|||
if pgrep honcho > /dev/null; then
|
||||
echo "Stopping honcho process..."
|
||||
pgrep honcho | xargs kill
|
||||
sleep 3
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
echo "Setting up environment..."
|
||||
|
|
|
|||
|
|
@ -97,6 +97,15 @@ class FilterTuple(_FilterTuple):
|
|||
fieldname, operator, value = s
|
||||
elif len(s) == 4: # type: ignore[redundant-expr]
|
||||
doctype, fieldname, operator, value = s
|
||||
elif len(s) == 5: # type: ignore[unreachable]
|
||||
from frappe.deprecation_dumpster import deprecation_warning
|
||||
|
||||
deprecation_warning(
|
||||
"2024-12-05",
|
||||
"v16",
|
||||
f"List type filters now should have 2, 3 or 4 elements: got 5 (Input: {s!r}). Hint: you probably need to remove the last filter element, a no-op from history.",
|
||||
)
|
||||
doctype, fieldname, operator, value, _noop = s
|
||||
else:
|
||||
raise ValueError(f"Invalid sequence length: {len(s)}. Expected 2, 3, or 4 elements.")
|
||||
if is_unspecified(doctype) or doctype is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue