Skip to content

Commit

Permalink
Merge pull request ManageIQ#18326 from agrare/remove_custom_snapshot_…
Browse files Browse the repository at this point in the history
…parent_saver

Remove custom snapshot_parent saver
  • Loading branch information
Fryguy authored Jan 5, 2019
2 parents e2ad097 + 1e389ff commit 38c34b9
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,6 @@ def subnets
)
end

def snapshot_parent
snapshot_parent_save_block = lambda do |_ems, inventory_collection|
snapshot_collection = inventory_collection.dependency_attributes[:snapshots].try(:first)

snapshot_collection.each do |snapshot|
ActiveRecord::Base.transaction do
child = Snapshot.find(snapshot.id)
parent = Snapshot.find_by(:uid_ems => snapshot.parent_uid)
child.update_attribute(:parent_id, parent.try(:id))
end
end
end

add_properties(
:custom_save_block => snapshot_parent_save_block
)
end

def customization_specs
add_properties(:manager_ref => %i(name))

Expand Down

0 comments on commit 38c34b9

Please sign in to comment.