From 85ec9d2b8188950cc1fd413841f7a40e11e2e0a6 Mon Sep 17 00:00:00 2001 From: Stephen Crawley Date: Mon, 24 Aug 2020 10:59:16 +1000 Subject: [PATCH 1/2] Bug fix: Widgets not including constructor choices ... in 'data' after the first call to render. This causes the widget to stop working when the user refreshes the page (for example). --- select2/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2/widgets.py b/select2/widgets.py index 15ea20f..e7551a1 100644 --- a/select2/widgets.py +++ b/select2/widgets.py @@ -73,7 +73,7 @@ def __init__(self, attrs=None, choices=(), js_options=None, *args, **kwargs): }) self.attrs.update(attrs) - self.choices = iter(choices) + self.choices = choices def reverse(self, lookup_view): opts = getattr(self, 'model', self.field.model)._meta From 4636cf92dd547eeccbd91fe0ed6156c685e0cc68 Mon Sep 17 00:00:00 2001 From: Stephen Crawley Date: Mon, 24 Aug 2020 16:40:09 +1000 Subject: [PATCH 2/2] Bug fix: broken css class combining logic ... in the Select widget. This caused the css classes for the