Skip to content

Commit

Permalink
download images only once
Browse files Browse the repository at this point in the history
  • Loading branch information
klausmeyer committed Nov 30, 2023
1 parent ab5b4d4 commit 64a5384
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/shows/download_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def initialize(show)
end

def call
return unless show.image_url.present?
return if show.image.attached?
return if show.image_url.blank?

show.image.attach(
io: URI.open(full_image_uri),
Expand Down

0 comments on commit 64a5384

Please sign in to comment.