From b5f2f37f3beab86f3f71f127bb3c2ae0b0ea4294 Mon Sep 17 00:00:00 2001 From: Zohar Galor Date: Wed, 25 Jan 2017 14:28:50 +0200 Subject: [PATCH] reuse save_custom_attribute_attribute_inventory --- app/models/ems_refresh/save_inventory_container.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/models/ems_refresh/save_inventory_container.rb b/app/models/ems_refresh/save_inventory_container.rb index 21df77276ed..e5750ce45da 100644 --- a/app/models/ems_refresh/save_inventory_container.rb +++ b/app/models/ems_refresh/save_inventory_container.rb @@ -397,16 +397,7 @@ def save_container_volumes_inventory(container_group, hashes, target = nil) end def save_additional_attributes_inventory(entity, hashes, target = nil) - return if hashes.nil? - - deletes = if target.kind_of?(ExtManagementSystem) - :use_association - else - [] - end - - save_inventory_multi(entity.additional_attributes, hashes, deletes, [:section, :name]) - store_ids_for_new_records(entity.additional_attributes, hashes, [:section, :name]) + save_custom_attribute_attribute_inventory(entity, :additional_attributes, hashes, target) end def save_custom_attribute_attribute_inventory(entity, attribute_name, hashes, target = nil)