Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
smithdc1 committed Nov 1, 2021
1 parent 8330141 commit 68679cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crispy_forms/templatetags/crispy_forms_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def render(self, context): # noqa: C901
css_class += "-file"
if field.errors:
css_class += " is-invalid"

widget.attrs["class"] = css_class

# HTML5 required attribute
Expand All @@ -142,10 +142,10 @@ def render(self, context): # noqa: C901

if attribute_name in widget.attrs:
if attribute not in widget.attrs[attribute_name]:
widget.attrs[attribute_name] += " " + attribute
widget.attrs[attribute_name] += " " + attribute
else:
widget.attrs[attribute_name] = attribute

return str(field)


Expand Down

0 comments on commit 68679cd

Please sign in to comment.