Commit 2159dca8 authored by Michal Čihař's avatar Michal Čihař

Fixed new language validation

parent a682aa46
......@@ -884,7 +884,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
'''
Validates new language choices.
'''
if self.project.new_lang == 'add ':
if self.project.new_lang == 'add':
if not self.file_format_cls.supports_new_language():
raise ValidationError(_(
'Chosen file format does not support adding '
......@@ -896,7 +896,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
'Format of base file for new translations '
'was not recognized!'
))
elif self.project.new_lang != 'add ' and self.new_base:
elif self.project.new_lang != 'add' and self.new_base:
raise ValidationError(_(
'Base file for new translations is not used because of '
'project settings.'
......
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