Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return empty AR relation instead of nil
InfraProvider don't have relation to cloud_tenants - there was created only empty method returning nil to preserve consitency - but on some places is expected AR relation object. For example screen add new subnet, there are listed network managers and their parent manager's cloud_tenants but they can be infra manager whithout cloud_tenants. Such place, where was expected AR Relation object is here: https://github.com/ManageIQ/manageiq-api/blob/master/app/controllers/api/subcollections/cloud_tenants.rb#L5 which was reached for example by this request: http://localhost:3000/api/providers/:id/cloud_tenants but it fails later when object has been infra manager and the method cloud_tenants_query_resource was returning nil.
- Loading branch information