Skip to content

Commit

Permalink
Use base class assert_referential_integrity
Browse files Browse the repository at this point in the history
USe base class assert_referential_integrity
  • Loading branch information
Ladas committed May 23, 2017
1 parent 0b78eca commit bcab13b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/manager_refresh/save_collection/saver/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcab13b

Please sign in to comment.