gently skip None as author intid

This commit is contained in:
Frédéric Péters 2014-07-22 17:15:16 +02:00
parent f85cf271ea
commit b2aaa47f00
1 changed files with 1 additions and 0 deletions

View File

@ -383,6 +383,7 @@ class SyncFromThemis(UtilityView):
authors_intids = [self.get_author_intid(x) for x in authors_v]
if None in authors_intids:
log.warn('unknown error in doc %s' % object.id)
authors_intids = [x for x in authors_intids if x is not None]
object.authors = self.create_relation_value_list_if_needed(
object.authors, authors_intids)
object.author_is_government = False