Skip to content
Snippets Groups Projects
Commit 9e877d975a94 authored by Samuel Trégouët's avatar Samuel Trégouët
Browse files

[hook] use `serializer.doc_type` if exists (closes #17069804)

let serializer decide if cw_etype and doc_type is different
parent f055f148f84e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment