[FIX] tools/safe_eval: Add missing builtin sorted
Before this commit, the function `sorted` wasn't available on `safe_eval`, even though it's a Python built-in, which mades it unavailable for Python-code evaluation, e.g. server actions. After this commit, the above function is now accessible. closes odoo/odoo#59715 X-original-commit: a725c8927963848c3f8ada3b71897a54b740cce6 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
@@ -258,6 +258,7 @@ _BUILTINS = {
|
||||
'sum': sum,
|
||||
'reduce': functools.reduce,
|
||||
'filter': filter,
|
||||
'sorted': sorted,
|
||||
'round': round,
|
||||
'len': len,
|
||||
'repr': repr,
|
||||
|
||||
Reference in New Issue
Block a user