Skip to content

Add helper to create required types

Refs https://gitlab.com/teklia/requests/-/issues/737

Some workers require a LOT of types to produce meaningful output. These workers should be able to create their required, often static types.

A new method create_required_types should iterate over :

  • a list of slugs
  • a list of a new namedtuple ElementType that specifies name, slug and is_folder

For each declared type, a call to CreateElementType should be done.

When only a slug is available, use it as name, and set folder to false.

The method check_required_types should be extended with a boolean (disabled by default) to create the types using the slug declarations