1
0
Fork 0
forked from OpenNeo/impress

oops, be consistent in using remote ID when loading pets

This commit is contained in:
Emi Matchu 2012-01-12 21:47:17 -06:00
parent f8c8b04929
commit c2c0fe92e8
2 changed files with 2 additions and 2 deletions

View file

@ -286,7 +286,7 @@ class Item < ActiveRecord::Base
existing_swf_assets = SwfAsset.object_assets.find_all_by_remote_id swf_asset_ids existing_swf_assets = SwfAsset.object_assets.find_all_by_remote_id swf_asset_ids
existing_swf_assets_by_id = {} existing_swf_assets_by_id = {}
existing_swf_assets.each do |swf_asset| existing_swf_assets.each do |swf_asset|
existing_swf_assets_by_id[swf_asset.id] = swf_asset existing_swf_assets_by_id[swf_asset.remote_id] = swf_asset
end end
# With each asset in the registry, # With each asset in the registry,

View file

@ -77,7 +77,7 @@ class PetState < ActiveRecord::Base
existing_swf_assets = SwfAsset.biology_assets.find_all_by_remote_id(swf_asset_ids) existing_swf_assets = SwfAsset.biology_assets.find_all_by_remote_id(swf_asset_ids)
existing_swf_assets_by_id = {} existing_swf_assets_by_id = {}
existing_swf_assets.each do |swf_asset| existing_swf_assets.each do |swf_asset|
existing_swf_assets_by_id[swf_asset.id] = swf_asset existing_swf_assets_by_id[swf_asset.remote_id] = swf_asset
end end
existing_relationships_by_swf_asset_id = {} existing_relationships_by_swf_asset_id = {}
unless pet_state.new_record? unless pet_state.new_record?