diff --git a/app/models/photo.rb b/app/models/photo.rb index 183fadceb..afc65875d 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -46,7 +46,8 @@ class Photo < ApplicationRecord flickr = owner.flickr info = flickr.photos.getInfo(photo_id: source_id) licenses = flickr.photos.licenses.getInfo - license = licenses.find { |l| l.id == info.license } + license = licenses.find { |l| l.id.to_i == info.license.to_i } + Rails.logger.error("Cannot find license: " + [info.license, licenses].inspect) unless license { title: calculate_title(info), license_name: license.name,