Commit 9dc327a3 authored by Michal Čihař's avatar Michal Čihař

Prevent name clash, this is different from standard get_or_create

parent 1e74ed51
......@@ -127,7 +127,7 @@ DEFAULT_LANGS = (
)
class LanguageManager(models.Manager):
def get_or_create(self, code):
def auto_get_or_create(self, code):
'''
Gets matching language for code (the code does not have to be exactly
same, cs_CZ is same as cs-CZ) or creates new one.
......
......@@ -74,7 +74,7 @@ class TranslationManager(models.Manager):
'''
Parses translation meta info and creates/updates translation object.
'''
lang = Language.objects.get_or_create(code = code)
lang = Language.objects.auto_get_or_create(code = code)
translation, created = self.get_or_create(
language = lang,
language_code = code,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment