Skip to content

Do not crash when an entity type exists

We should catch errors when trying to create an entity type. If the error looks like

{'name': ['Entity Type with name XXX already exists in corpus XXX']}
  • log a warning with that error (without name)
  • call list_corpus_entity_types to reload the cache of entity types
  • continue to the next type

This should be moved to a dedicated helper.

Edited by Yoann Schneider