Applying a template on a process that already has the template's versions can cause IntegrityError
- Create a process
- Add a worker version on that process
- Create a template from that process
- Apply that template back onto the original process
This causes an IntegrityError because the endpoint tries to create a WorkerRun that violates the dataimport_id, worker_version_id
unique constraint.
To discuss before implementing anything:
- Should the endpoint just delete all the existing worker runs and overwrite everything with the template?
- Should applying a template fail when there would be duplicates?
- Should applying a template ignore worker versions that already exist?