diff --git a/Gemfile.lock b/Gemfile.lock index f15f1890..a24e2b7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,7 +68,7 @@ GIT GIT remote: git://github.com/rubyamf/rocketamf.git - revision: 3f16cf841d9c36045f720b307bbffa61fb63a7ac + revision: 796f591d002b5cf47df436dbcbd6f2ab00e869ed specs: RocketAMF (1.0.0) diff --git a/app/models/pet_state.rb b/app/models/pet_state.rb index 859d7b19..0b3678b6 100644 --- a/app/models/pet_state.rb +++ b/app/models/pet_state.rb @@ -138,7 +138,7 @@ class PetState < ActiveRecord::Base def self.from_pet_type_and_biology_info(pet_type, info) swf_asset_ids = [] info.each do |zone_id, asset_info| - if asset_info + if zone_id.present? && asset_info swf_asset_ids << asset_info[:part_id].to_i end end @@ -166,7 +166,7 @@ class PetState < ActiveRecord::Base pet_state.pet_type = pet_type # save the second case from having to look it up by ID relationships = [] info.each do |zone_id, asset_info| - if asset_info + if zone_id.present? && asset_info swf_asset_id = asset_info[:part_id].to_i swf_asset = existing_swf_assets_by_id[swf_asset_id] unless swf_asset