Skip to content

Commit

Permalink
#24 fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
tatterdemalion committed Sep 5, 2017
1 parent 76ce459 commit d08abcb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion nece/models.py
Expand Up @@ -48,7 +48,9 @@ def translate(self, language_code=None, **kwargs):
self._language_code = language_code
if not self.is_default_language(self._language_code):
self.translations = self.translations or {}
self.translations[self._language_code] = {}
self.translations[self._language_code] = self.translations.get(
self._language_code, {}
)
for name, value in kwargs.items():
if name not in self._meta.translatable_fields:
raise NonTranslatableFieldError(name)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -7,7 +7,7 @@

long_description = ld.replace(ld[0:ld.find('nece?')], '')

version = '0.7.3'
version = '0.7.4'
description = "A content translation framework using Postgresql's jsonb" + \
" field in the background"
url = 'https://github.com/tatterdemalion/django-nece'
Expand Down

0 comments on commit d08abcb

Please sign in to comment.