Fix unit tests with new license support
Make the license field in the forms optional and let them properly be defaulted to "".
This commit is contained in:
@@ -39,4 +39,5 @@ class SubmitStartForm(wtforms.Form):
|
||||
"Separate tags by commas."))
|
||||
license = wtforms.SelectField(
|
||||
_('License'),
|
||||
[wtforms.validators.Optional(),],
|
||||
choices=licenses_as_choices())
|
||||
|
||||
@@ -69,9 +69,7 @@ def submit_start(request):
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user