fixed other instances of custom field list without blank default

This commit is contained in:
tschmidt 2012-01-18 11:38:56 -08:00
parent 9aa32cc4f6
commit 0f38b688a1

View File

@ -59,8 +59,8 @@ class EditTicketForm(forms.ModelForm):
instanceargs['max_digits'] = field.max_length
elif field.data_type == 'list':
fieldclass = forms.ChoiceField
choices = field.choices_as_array
if field.empty_selection_list:
choices = field.choices_as_array
choices.insert(0, ('','---------' ) )
instanceargs['choices'] = choices
elif field.data_type == 'boolean':
@ -409,8 +409,8 @@ class PublicTicketForm(forms.Form):
instanceargs['max_digits'] = field.max_length
elif field.data_type == 'list':
fieldclass = forms.ChoiceField
choices = field.choices_as_array
if field.empty_selection_list:
choices = field.choices_as_array
choices.insert(0, ('','---------' ) )
instanceargs['choices'] = choices
elif field.data_type == 'boolean':