Fix minor issues

This commit is contained in:
Eugene Burmakin 2025-08-23 19:09:18 +02:00
parent a6f4a931af
commit d400d3c9fd
3 changed files with 3 additions and 5 deletions

View file

@ -21,8 +21,6 @@ module TripsHelper
immich_search_url(settings['immich_url'], start_date, end_date)
when 'photoprism'
photoprism_search_url(settings['photoprism_url'], start_date, end_date)
else
nil # return nil for nil or unknown source
end
end

View file

@ -49,7 +49,7 @@ class Imports::Create
private
def importer(source)
return raise ArgumentError, 'Import source cannot be nil' if source.nil?
raise ArgumentError, 'Import source cannot be nil' if source.nil?
case source.to_s
when 'google_semantic_history' then GoogleMaps::SemanticHistoryImporter

View file

@ -11,7 +11,7 @@ class Photos::Thumbnail
def call
raise ArgumentError, 'Photo source cannot be nil' if source.nil?
raise unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
HTTParty.get(request_url, headers: headers)
end
@ -52,7 +52,7 @@ class Photos::Thumbnail
request_headers
end
def unsupported_source_error
unsupported_source_error unless SUPPORTED_SOURCES.include?(source)
raise ArgumentError, "Unsupported source: #{source}"
end
end