#20618: Giving a field an empty label breaks `BoundField.label_tag` (IndexError)
---------------------------------+-----------------------
     Reporter:  bmispelon        |      Owner:  bmispelon
         Type:  Bug              |     Status:  new
    Component:  Forms            |    Version:  master
     Severity:  Release blocker  |   Keywords:
 Triage Stage:  Unreviewed       |  Has patch:  0
Easy pickings:  0                |      UI/UX:  0
---------------------------------+-----------------------
 The following code shows the regression:
 {{{#!python
 from django import forms

 class F(forms.Form):
     foo = forms.CharField(label='')

 print(F()['foo'].label_tag())
 }}}

 On django 1.5, this prints `<label for="id_foo"></label>`. On master, it
 raises an IndexError.

 This is regression was introduced by
 584bd14dcfdee9585fec7794d53ce120ea73d0bc.
 Previously, calling the `label_tag` on a field with an empty label would

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20618>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.a340ec908565da73e5e9031b7315213a%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to