Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle writable_storages in miq_request_workflow better
The MiqPreloader.preload call was added prior to the usage of `.writable_storages` for the miq_request_workflow.rb. When writable_storages was called, it would make a new call to the database every time for each of the storages, which was not ideal. This change makes it so that the writable_storages method will first check to see if the proper data is already loaded, and if so, just use that. Otherwise, it will do the query as normal. The other change was to change the MiqPreloader.preload to include the `host_storages`, which properly applies the loaded records needed for the changes to the `host` model to work.
- Loading branch information