Make the license field in the forms optional and let them
properly be defaulted to "".
"You usually don't need to change this."))
license = wtforms.SelectField(
_('License'),
+ [wtforms.validators.Optional(),],
choices=licenses_as_choices())
class EditProfileForm(wtforms.Form):
media.description_html = cleaned_markdown_conversion(
media.description)
- media.license = (
- unicode(request.POST.get('license'))
- or '')
+ media.license = unicode(request.POST.get('license', ''))
media.slug = unicode(request.POST['slug'])
"Separate tags by commas."))
license = wtforms.SelectField(
_('License'),
+ [wtforms.validators.Optional(),],
choices=licenses_as_choices())
entry.description_html = cleaned_markdown_conversion(
entry.description)
- entry.license = (
- unicode(request.POST.get('license'))
- or '')
+ entry.license = unicode(request.POST.get('license', ''))
entry.uploader = request.user._id