Closed agrare closed 5 years ago
Fix two issues with syncing multiple providers.
[[klass, id]]
[id]
Fix invalid targets being passed to InventorySync.sync, targets must either be an ActiveRecord object or a [klass, id] pair. This was passing just id.
InventorySync.sync
ActiveRecord
[klass, id]
data["provider_ids"] looks like ["1", "2"] but find_provider_ids looks like [1, 2] so every provider id looks invalid.
data["provider_ids"]
["1", "2"]
find_provider_ids
[1, 2]
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1751877
Some comments on commits https://github.com/agrare/cfme-cloud_services/compare/891dbdd49d384597cb99aca13275cc97df2de0c4~...fcbd46f5f7f8a64f43408d09694a88d315be87b5
app/controllers/api/red_hat_cloud_service_providers_controller.rb
cfme
spec/requests/red_hat_cloud_service_providers_spec.rb
Checked commits https://github.com/agrare/cfme-cloud_services/compare/891dbdd49d384597cb99aca13275cc97df2de0c4~...fcbd46f5f7f8a64f43408d09694a88d315be87b5 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 2 files checked, 0 offenses detected Everything looks fine. :trophy:
Fix two issues with syncing multiple providers.
[[klass, id]]
not[id]
Fix invalid targets being passed to
InventorySync.sync
, targets must either be anActiveRecord
object or a[klass, id]
pair. This was passing just id.data["provider_ids"]
looks like["1", "2"]
butfind_provider_ids
looks like[1, 2]
so every provider id looks invalid.Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1751877