Skip to content

Persist DataImport.payload usage for Elements initialisation

According to https://wiki.vpn/en/arkindex/dev-doc/dataimport-payload we can move the following payload attributes as nullable model args:

  • element becomes a FK toward Element
  • name_contains becomes a CharField
  • best_class becomes a CharField
  • element_type becomes a FK toward ElementType
  • elements becomes a boolean use_selection after #315 (closed) is completed

These payload fields can be thrown away after workflow creation:

  • ml_tools (ml_tools are only used to configure the workflow, and should not be passed to the init task`)
  • chunks (used to configure the tasks)
  • thumbnails

This needs only a MR on the backend, tasks already support those args.

Beware of the DataImport.ml_tools cached property that must go away too.

The serializer fields should not be changed, to avoid updating the frontend

Edited by Eva Bardou