fix(convert_to_value): convert dict_keys and dict_values to a tuple as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
a9d0abaf7b
commit
bd48f5df65
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
import re
|
||||
import string
|
||||
from collections.abc import KeysView, ValuesView
|
||||
from functools import cached_property, wraps
|
||||
|
||||
import frappe
|
||||
|
|
@ -33,7 +34,7 @@ def convert_to_value(o: FilterValue):
|
|||
return int(o)
|
||||
elif isinstance(o, dict):
|
||||
return frappe.as_json(o)
|
||||
elif isinstance(o, (list, tuple, set)):
|
||||
elif isinstance(o, (list, tuple, set, KeysView, ValuesView)):
|
||||
return tuple(convert_to_value(item) for item in o)
|
||||
return o
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue