From 62f842e2e568c87387e3da3ab76600bd0aab3e95 Mon Sep 17 00:00:00 2001 From: Loic Raucy Date: Wed, 9 Jan 2013 10:07:44 +0100 Subject: Fixed #19581 -- ensure unique html ids with CheckboxSelectMultiple widgets ID check is now done the same way as MultipleHiddenInput. --- django/forms/widgets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'django/forms') diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 4782b99117..d6ea56f0c8 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -754,17 +754,17 @@ class RadioSelect(Select): class CheckboxSelectMultiple(SelectMultiple): def render(self, name, value, attrs=None, choices=()): if value is None: value = [] - has_id = attrs and 'id' in attrs final_attrs = self.build_attrs(attrs, name=name) + id_ = final_attrs.get('id', None) output = ['