My test db is a copy of our local lab foreman instans.
I have a owner_roles table entry [64,9] there is a user 64, there is no role 9.
roles table has role ids 1..8, 10,12. I assume that we had some roles removed but the owner_roles table did not update.
Validation could also be the issue because it validates the id not the relation.