Return list instead of map object in get_action
The value must be converted into JSON.
This commit is contained in:
1 parent
e6911c1c7c
commit
065e18a9fb
1 file changed
+4
-1
@@ -292,6 +292,9 @@ class ActionMixin(ModelSQL):
|
||||
def get_action(cls, ids, names):
|
||||
def identical(v):
|
||||
return v
|
||||
|
||||
def list_int(v):
|
||||
return list(map(int, v))
|
||||
records = cls.browse(ids)
|
||||
result = {}
|
||||
for name in names:
|
||||
@@ -307,7 +310,7 @@ class ActionMixin(ModelSQL):
|
||||
else:
|
||||
convert = int
|
||||
elif isinstance(value, (list, tuple)):
|
||||
convert = partial(map, int)
|
||||
convert = list_int
|
||||
values[record.id] = convert(value)
|
||||
return result
|
||||
|
||||
|
||||
Reference in new issue
Block a user