As a developer running in development the indexer may error when deleting a repository which contains resource records

Description

Initially surfaced as a PR (https://github.com/archivesspace/archivesspace/pull/1929), we're opting to file a JIRA for this issue to see if others have experienced it in development, before deciding whether or not to implement a fix (whether the one proposed in this PR or another option) that may only pertain to a once-in-a-lifetime sequence of events.

Per the original report, developers may receive `NoMethodError: undefined method `[]' for nil:NilClass` errors which happen because the deleted parent repository can no longer be resolved when the indexer checks if it is published while processing a record. The return value is not important as the record(s) being indexed - resources in deleted repository - are about to be deleted themselves anyway.

Environment

None

Assignee

Unassigned

Reporter

Lora Woodford

Labels

None

Priority

Trivial