See #1482670 (I receive a fault when adding a word to user dictionary.)

This commit is contained in:
Kovid Goyal 2015-08-07 20:50:12 +05:30
parent ae73e16909
commit 096895828a

View File

@ -243,7 +243,7 @@ class Dictionaries(object):
def add_user_words(self, words, langcode):
for d in self.dictionaries.itervalues():
if d.primary_locale.langcode == langcode:
if getattr(d.primary_locale, 'langcode', None) == langcode:
for word in words:
d.obj.add(word)