@mhjacks try this instead:
::Katello::Repository.where(id: ::Katello::RepositoryErratum.where(erratum_pulp3_href: "/pulp/api/v3/content/rpm/advisories/09d8fae6-4043-4809-9624-a19e6a440332/").pluck(:repository_id)).map{|r| r.root.name}
Assuming that now returns something, are the repositories reported in the broken content view? They don’t all have to be, but some of them should.
As long as you’re not surprised by the results above, I think we can continue with manual cleanup. It should be easy granted that you have the bad errata list from the error:
- Copy the list of missing content units from the error
- Run the following in the console using the copied list:
::Katello::RepositoryErratum.where(erratum_pulp3_href: <copy list of missing content units>).delete_all
for example,
::Katello::RepositoryErratum.where(erratum_pulp3_href: ['/pulp/api/v3/content/rpm/advisories/633f337e-a0f0-4c6b-ad0d-b6fdbfe470f7/', '/pulp/api/v3/content/rpm/advisories/4566ee58-c015-4551-823b-37069f2ebfa9/']).delete_all
Then, try publishing again.