diff --git a/app/helpers/trips_helper.rb b/app/helpers/trips_helper.rb index e035b53b..89f7771a 100644 --- a/app/helpers/trips_helper.rb +++ b/app/helpers/trips_helper.rb @@ -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 diff --git a/app/services/imports/create.rb b/app/services/imports/create.rb index 1f952715..67d05abb 100644 --- a/app/services/imports/create.rb +++ b/app/services/imports/create.rb @@ -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 diff --git a/app/services/photos/thumbnail.rb b/app/services/photos/thumbnail.rb index 9ad4e57e..ad2da385 100644 --- a/app/services/photos/thumbnail.rb +++ b/app/services/photos/thumbnail.rb @@ -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