Skip to content

Commit

Permalink
address nil URL case for media embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jul 20, 2024
1 parent f2bead1 commit 1c0877c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/commercial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def self.read_file(file)
private

def valid_url
return unless url

result = Commercial.render_from_url(url)
errors.add(:base, result[:error]) if result[:error]
end
Expand Down

0 comments on commit 1c0877c

Please sign in to comment.