From fc542831825fedfdf59d7b8713e457ed168f3a91 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 9 Jun 2022 17:23:11 +0200 Subject: JSON fields: fix multi-value choices fields --- ishtar_common/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common/widgets.py') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 1f5a169ba..4852f4ceb 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -140,7 +140,7 @@ class Select2DynamicBase(Select2Media): value = value[0] values = value for va in values: - if va not in [key for key, va in choices]: + if va not in [key for key, v in choices]: choices.insert(1, (va, va)) self.choices = choices klass = attrs and attrs.get("class") or "" -- cgit v1.2.3