diff --git a/app/models/pet.rb b/app/models/pet.rb index 0557fea4..04f6bc1d 100644 --- a/app/models/pet.rb +++ b/app/models/pet.rb @@ -137,6 +137,9 @@ class Pet < ApplicationRecord end def self.fetch_metadata(name, timeout: 10) + # If this is an image hash "pet name", it has no metadata. + return nil if name.start_with?("@") + request = PET_SERVICE.action('getPet').request([name]) send_amfphp_request(request).tap do |data| if data[:name].blank?