Skip to content
Snippets Groups Projects
Commit 79fd39b9 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

More bugfix

parent 3f12e07c
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ class InformationLocale(models.Model):
@staticmethod
def get_information_locale_with_fallback(information_id, language_code=translation.get_language()):
if information_id == None:
return ""
return None
# Try with user's preferred locale first
try:
return InformationLocale.objects.get(
......@@ -50,4 +50,8 @@ class InformationLocale(models.Model):
@staticmethod
def get_heading_with_fallback(information_id, language_code=translation.get_language()):
return InformationLocale.get_information_locale_with_fallback(information_id, language_code).headline
\ No newline at end of file
information_locale = InformationLocale.get_information_locale_with_fallback(information_id, language_code)
if information_locale == None:
return ""
else:
return InformationLocale.get_information_locale_with_fallback(information_id, language_code).headline
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment