From a4394265c0450f07a8c2cbca044d5cfb309d8122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 6 Aug 2021 09:30:06 +0200 Subject: [PATCH] Freeze the content of tuple The content of a tuple could be unhashable so it must also be frozen. issue10603 review367321002 --- tryton/common/selection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/common/selection.py b/tryton/common/selection.py index 5544640fba..ba345c41b1 100644 --- a/tryton/common/selection.py +++ b/tryton/common/selection.py @@ -145,7 +145,7 @@ def freeze_value(value): if isinstance(value, dict): return tuple(sorted((k, freeze_value(v)) for k, v in value.items())) - elif isinstance(value, (list, set)): + elif isinstance(value, (list, set, tuple)): return tuple(freeze_value(v) for v in value) else: return value