*** Bug 1677745 has been marked as a duplicate of this bug. ***
I have three possible ideas for options at this point, barring anything Tina and GT came up with. 1) The easy, kind of hacky solution (works but is fixing the symptom): changing the get_user method in the mixin to this: def get_user if @user || User.in_my_region.find_by(:userid => userid) @user ||= User.in_my_region.find_by(:userid => userid).tap do |u| u.current_group_by_description = options[:requester_group] if options[:requester_group] end else @user = User.find_by(:userid => "admin") end end alias_method :tenant_identity, :get_user However, the better solution to this is either 2) figuring out how we still have options[:requester_group] set to something that's linked to the user that got deleted, or 3) a complete overhaul of how we delete users (problems of this sort would be helped by changing our user deletion to be soft deletes only.) I don't know what the right solution to this is, if a quick fix is necessary, the first solution should work fine.
The reproducer listed by Robb above has my changes and isn't failing, so I'm not sure what to tell you, Yuri.
PR to not allow to delete user if he/she referred to from other models: https://github.com/ManageIQ/manageiq/pull/18472
PR to fix error: https://github.com/ManageIQ/manageiq/pull/18483
Drew, I think work around you proposed in #Comment 12 will help. PR I referred to in #Comment 17 would not help here
PR: https://github.com/ManageIQ/manageiq/pull/18663
Verified in Version: 5.11.0.3.20190507174347_a77bd90