Opened 8 years ago

Closed 8 years ago

#27642 closed Bug (fixed)

Make `forms.utils.flatatt` not add values which are `None` to attrs

Reported by: Illia Volochii Owned by: nobody
Component: Forms Version:
Severity: Normal Keywords: flatatt
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When a person adds arguments like

{'id': None, 'class': 'smth'}

to an <input> tag, it turns into

<input ... id="None" class="smth">

I think, it is not what the person expects to see.


Pull request

Change History (2)

comment:1 by Claude Paroz, 8 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 4a51ba2:

Fixed #27642 -- Made forms.utils.flatatt() omit 'None' values from attrs.

Note: See TracTickets for help on using tickets.
Back to Top