Skip to content

Commit

Permalink
Merge pull request #406 from fvgoto/patch-1
Browse files Browse the repository at this point in the history
FALLBACK_LANGUAGES['default'] needs to be tuple
  • Loading branch information
deschler committed Apr 8, 2017
2 parents 74e3f66 + 576fe15 commit 5d31cbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modeltranslation/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# By default we fallback to the default language
FALLBACK_LANGUAGES = getattr(settings, 'MODELTRANSLATION_FALLBACK_LANGUAGES', (DEFAULT_LANGUAGE,))
if isinstance(FALLBACK_LANGUAGES, (tuple, list)):
FALLBACK_LANGUAGES = {'default': FALLBACK_LANGUAGES}
FALLBACK_LANGUAGES = {'default': tuple(FALLBACK_LANGUAGES)}
if 'default' not in FALLBACK_LANGUAGES:
raise ImproperlyConfigured(
'MODELTRANSLATION_FALLBACK_LANGUAGES does not contain "default" key.')
Expand Down

0 comments on commit 5d31cbb

Please sign in to comment.