Skip to content

IntegrityError when exporting metadata with worker versions

Sentry Issue: ARKINDEX-BACKEND-T8

IntegrityError: FOREIGN KEY constraint failed
  File "rq/worker.py", line 1031, in perform_job
    rv = job.perform()
  File "rq/job.py", line 749, in perform
    self._result = self._execute()
  File "rq/job.py", line 772, in _execute
    result = self.func(*self.args, **self.kwargs)
  File "arkindex/documents/export/__init__.py", line 124, in export_corpus
  File "arkindex/documents/export/__init__.py", line 82, in save_sqlite

If a corpus has any metadata with worker version IDs that are not found anywhere else (elements, entities, classifications, etc.), the export will fail.