IntegrityError when creating a worker run with a version already in use in a process
Sentry Issue: ARKINDEX-BACKEND-YS
UniqueViolation: duplicate key value violates unique constraint "dataimport_workerrun_version_id_dataimport_id_22647784_uniq"
DETAIL: Key (version_id, dataimport_id)=(1971a350-7d3a-457c-8dcf-e03e3091b70c, b6c3a481-3bac-494f-9c8e-7fdabb7be3b8) already exists.
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
IntegrityError: duplicate key value violates unique constraint "dataimport_workerrun_version_id_dataimport_id_22647784_uniq"
DETAIL: Key (version_id, dataimport_id)=(1971a350-7d3a-457c-8dcf-e03e3091b70c, b6c3a481-3bac-494f-9c8e-7fdabb7be3b8) already exists.
(23 additional frame(s) were not displayed)
...
File "django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)