1
0
Fork 0
forked from OpenNeo/impress

another oops, better fix

This commit is contained in:
Emi Matchu 2012-01-12 22:02:12 -06:00
parent c2c0fe92e8
commit 9c0c7b78cf
2 changed files with 2 additions and 2 deletions

View file

@ -316,7 +316,7 @@ class Item < ActiveRecord::Base
swf_asset.origin_pet_type = pet_type swf_asset.origin_pet_type = pet_type
# Build and update the relationship # Build and update the relationship
relationship = existing_relationships_by_item_id_and_swf_asset_id[item.id][swf_asset_id] rescue nil relationship = existing_relationships_by_item_id_and_swf_asset_id[item.id][swf_asset.id] rescue nil
unless relationship unless relationship
relationship = ParentSwfAssetRelationship.new relationship = ParentSwfAssetRelationship.new
relationship.parent = item relationship.parent = item

View file

@ -97,7 +97,7 @@ class PetState < ActiveRecord::Base
end end
swf_asset.origin_biology_data = asset_info swf_asset.origin_biology_data = asset_info
swf_asset.origin_pet_type = pet_type swf_asset.origin_pet_type = pet_type
relationship = existing_relationships_by_swf_asset_id[swf_asset_id] relationship = existing_relationships_by_swf_asset_id[swf_asset.id]
unless relationship unless relationship
relationship ||= ParentSwfAssetRelationship.new relationship ||= ParentSwfAssetRelationship.new
relationship.parent = pet_state relationship.parent = pet_state