diff --git a/app/models/manager_refresh/save_collection/saver/default.rb b/app/models/manager_refresh/save_collection/saver/default.rb index 5e597d0063b..3362767e928 100644 --- a/app/models/manager_refresh/save_collection/saver/default.rb +++ b/app/models/manager_refresh/save_collection/saver/default.rb @@ -80,6 +80,8 @@ def update_record!(inventory_collection, record, hash, inventory_object) end def create_record!(inventory_collection, hash, inventory_object) + return unless assert_referential_integrity(hash, inventory_object) + record = inventory_collection.model_class.create!(hash.except(:id)) inventory_object.id = record.id