Fixed problems when running the Django shell

This commit is contained in:
Raphael Michel
2016-05-30 22:16:03 +02:00
parent 82fd222a72
commit 33d3e5c753

View File

@@ -43,7 +43,7 @@ class LazyI18nString:
the string in the system's default language. If this is unavailable as well, it the string in the system's default language. If this is unavailable as well, it
will give you the string in the first language available. will give you the string in the first language available.
""" """
return self.localize(translation.get_language()) return self.localize(translation.get_language() or settings.LANGUAGE_CODE)
def __bool__(self): def __bool__(self):
if not self.data: if not self.data: