mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-04 23:24:49 -04:00
Rubocop
This commit is contained in:
@@ -43,6 +43,6 @@ module OpenFarmData
|
||||
def fetch_attr(key)
|
||||
return if openfarm_data.blank?
|
||||
|
||||
openfarm_data.fetch('attributes', {}).fetch(key, nil)
|
||||
openfarm_data.dig('attributes', key)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -47,7 +47,7 @@ class Photo < ApplicationRecord
|
||||
info = flickr.photos.getInfo(photo_id: source_id)
|
||||
licenses = flickr.photos.licenses.getInfo
|
||||
license = licenses.find { |l| l.id.to_i == info.license.to_i }
|
||||
Rails.logger.error("Cannot find license: " + [info.license, licenses].inspect) unless license
|
||||
Rails.logger.error("Cannot find license: #{[info.license, licenses].inspect}") unless license
|
||||
{
|
||||
title: calculate_title(info),
|
||||
license_name: license.name,
|
||||
|
||||
Reference in New Issue
Block a user