Commit 988daad4 authored by Michal Čihař's avatar Michal Čihař

Simplify check for empty suggestion

parent 10d61c5e
...@@ -180,7 +180,7 @@ def handle_translate(obj, request, profile, user_locked, ...@@ -180,7 +180,7 @@ def handle_translate(obj, request, profile, user_locked,
if 'suggest' in request.POST: if 'suggest' in request.POST:
# Handle suggesion saving # Handle suggesion saving
user = request.user user = request.user
if form.cleaned_data['target'] == len(form.cleaned_data['target']) * ['']: if form.cleaned_data['target'][0] == '':
messages.error(request, _('Your suggestion is empty!')) messages.error(request, _('Your suggestion is empty!'))
# Stay on same entry # Stay on same entry
return HttpResponseRedirect(this_unit_url) return HttpResponseRedirect(this_unit_url)
......
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