From 30e8873b10db560b845f23697e00d20c42d7a989 Mon Sep 17 00:00:00 2001 From: wolfmetr Date: Mon, 23 Dec 2024 19:48:18 +0000 Subject: [PATCH] Fix for issue #648: Ensure choices are valid (value, label) tuples to avoid 'not enough values to unpack' error --- eav/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eav/forms.py b/eav/forms.py index 5ff60a5a..95950434 100644 --- a/eav/forms.py +++ b/eav/forms.py @@ -107,7 +107,7 @@ def _build_dynamic_fields(self): if datatype == attribute.TYPE_ENUM: values = attribute.get_choices().values_list("id", "value") - choices = ["", "-----", *list(values)] + choices = [("", ""), ("-----", "-----"), *list(values)] defaults.update({"choices": choices}) if value: