This patch fixes the following issue:
https://bugzilla.redhat.com/show_bug.cgi?id=770622
I consider this patch a little bit hackish but unfortunately I haven't found any
cleaner way to join the providers table to the deployments table.
Please feel free to NACK it and suggest any better solution you can think of.