diff --git a/hooks.py b/hooks.py index f055f148f84e3a02a040e7d47d3f4cee0adaa041_aG9va3MucHk=..9e877d975a94509f3c6a22e9e0d7d033e0a56589_aG9va3MucHk= 100644 --- a/hooks.py +++ b/hooks.py @@ -98,7 +98,7 @@ # IFullTextIndex serializer, therefore the "id" and "doc_type" in # kwargs below must be container data. kwargs['id'] = json['eid'] - kwargs['doc_type'] = json['cw_etype'] + kwargs['doc_type'] = getattr(serializer, 'doc_type', json['cw_etype']) if json.get('parent'): kwargs['parent'] = json.pop('parent') else: # TODO only for types that have parents