1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.

This commit is contained in:
Nick Pope
2017-12-11 12:08:45 +00:00
committed by Tim Graham
parent a9e5ac823d
commit d13a9e44de
61 changed files with 511 additions and 564 deletions

View File

@@ -153,7 +153,7 @@ class BoundField:
if id_:
id_for_label = widget.id_for_label(id_)
if id_for_label:
attrs = dict(attrs or {}, **{'for': id_for_label})
attrs = {**(attrs or {}), 'for': id_for_label}
if self.field.required and hasattr(self.form, 'required_css_class'):
attrs = attrs or {}
if 'class' in attrs: