Commit e6230d4c authored by Michal Čihař's avatar Michal Čihař

Simplify check

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 1f703ac0
......@@ -956,10 +956,10 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
'''
Parses language code from path.
'''
parts = self.filemask.split('*', 1)
# No * in mask?
if len(parts) == 1:
if '*' not in self.filemask:
return 'INVALID'
parts = self.filemask.split('*', 1)
# Assume English language for template
if path == self.template:
return 'en'
......
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