I guess it depends if your Foreman server or your DB is the heavily-loaded machine. If it makes little difference to the performance, I think I'm in favour of @witlessbird's version, since it reduces DB lookups. Thoughts?