Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoistinen committed Apr 16, 2015
1 parent e81788c commit 2f148c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aldryn_newsblog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def known_translation_getter(self, field, default=None, language_code=None,
# fallbacks, the developer should ensure that their project's Parler
# settings match the CMS settings.
object_languages = self.get_available_languages()
language_code = language_code or get_current_language()
if language_code not in object_languages:
# OK, we're going to have to use a fallback language
fallbacks = get_fallback_languages(language_code)
Expand Down Expand Up @@ -183,7 +184,7 @@ def get_absolute_url(self, language=None):
# articles before the page exists.
#
if language is None:
language = get_language()
language = get_current_language()
kwargs = {}
permalink_type = self.app_config.permalink_type
if 'y' in permalink_type:
Expand Down

0 comments on commit 2f148c8

Please sign in to comment.