Skip to content
Snippets Groups Projects
Commit 9f79822f authored by Camille Périnel's avatar Camille Périnel
Browse files

Fix news without translations

parent 5d2039e9
No related branches found
Tags 0.4.2
No related merge requests found
......@@ -67,6 +67,8 @@ class NewsboxI18NBase(six.with_metaclass(NewsboxI18NModelBase, TranslatableModel
language = current_language
if language not in self.get_available_languages():
if not self.get_available_languages():
return None
language = (list(self.get_fallback_languages()) + list(self.get_available_languages()))[0]
activate(language)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment