Skip to content

Commit

Permalink
reuse save_custom_attribute_attribute_inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
zgalor committed Jan 25, 2017
1 parent dbc58da commit b5f2f37
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions app/models/ems_refresh/save_inventory_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b5f2f37

Please sign in to comment.