fixes #4745 - fixing error on repo discover

This is a temporary fix until we fully integrate foreman roles into katello
Merge pull request #3929 from jlsherrill/discover

fixes #4745 - fixing error on repo discover