diff --git a/wger/utils/language.py b/wger/utils/language.py index 5a1f13e..f8975d5 100644 --- a/wger/utils/language.py +++ b/wger/utils/language.py @@ -49,7 +49,9 @@ def load_language(language_code=None): return language try: - language = Language.objects.get(short_name=used_language) + language, is_created = Language.objects.get_or_create(short_name=used_language) + # language = Language.objects.get(short_name=used_language) + except ObjectDoesNotExist: # No luck, load english as our fall-back language language = Language.objects.get(short_name="en")