Reindexing elasticsearch brings an error

Hi,

i was trying to reindex user index, which brings the following error. But the same command works on other index like case-search index

cchq echis django-manage ptop_reindexer_v2 user

Processing 15372 documents (~15372 already processed): ...
2021-05-20 19:12:56,515 INFO reindexer Processing batch of 217 docs
Traceback (most recent call last):
File "manage.py", line 195, in
main()
File "manage.py", line 42, in main
execute_from_command_line(sys.argv)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/python_env-3.6/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_comm$
nd_line
utility.execute()
File "/home/cchq/www/echis/releases/2021-05-18_22.04/python_env-3.6/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/apps/hqcase/management/commands/ptop_reindexer_v2.py", line 82, in run_from_argv
super(SubCommand, self).run_from_argv(argv)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/python_env-3.6/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/python_env-3.6/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/apps/hqcase/management/commands/ptop_reindexer_v2.py", line 153, in handle
reindexer.reindex()
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/ex-submodules/pillowtop/reindexer/reindexer.py", line 276, in reindex
processor.run()
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/doc_processor/interface.py", line 119, in run
for doc in self.document_iterator:
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/doc_processor/couch.py", line 39, in iter
for result in super(ResumableDocsIterator, self).iter():
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/pagination.py", line 263, in iter
for item in paginate_function(self.data_function, resumable_args, event_handler):
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/pagination.py", line 158, in paginate_function
event_handler.page_end(total_emitted, datetime.utcnow() - start_time, *args, **kwargs)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/pagination.py", line 72, in page_end
handler.page_end(total_emitted, duration, *args, **kwargs)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/doc_processor/interface.py", line 151, in page_end
processor.process_chunk()
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/util/doc_processor/interface.py", line 195, in process_chunk
ok = self.doc_processor.process_bulk_docs(self.changes, self.progress.logger)
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/ex-submodules/pillowtop/reindexer/reindexer.py", line 211, in process_bulk_docs
self._doc_to_change(doc) for doc in docs
File "/home/cchq/www/echis/releases/2021-05-18_22.04/corehq/ex-submodules/pillowtop/reindexer/reindexer.py", line 212, in
if self.process_deletes or not is_deletion(doc.get('doc_type'))
AttributeError: 'NoneType' object has no attribute 'get'
Sentry is attempting to send 0 pending error messages