Commit 5415a297 authored by Michal Čihař's avatar Michal Čihař

Ignore empty author

parent 6f3bf424
...@@ -610,7 +610,7 @@ def upload_translation(request, project, subproject, lang): ...@@ -610,7 +610,7 @@ def upload_translation(request, project, subproject, lang):
else: else:
form = SimpleUploadForm(request.POST, request.FILES) form = SimpleUploadForm(request.POST, request.FILES)
if form.is_valid(): if form.is_valid():
if request.user.has_perm('trans.author_translation'): if request.user.has_perm('trans.author_translation') and form.cleaned_data['author_name'] != '' and form.cleaned_data['author_email'] != '':
author = '%s <%s>' % (form.cleaned_data['author_name'], form.cleaned_data['author_email']) author = '%s <%s>' % (form.cleaned_data['author_name'], form.cleaned_data['author_email'])
else: else:
author = None author = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment