From 1c0877cb6626c3ddf88974d222b86ead95b2850b Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 20 Jul 2024 12:49:08 -0700 Subject: [PATCH] address nil URL case for media embeds --- app/models/commercial.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/commercial.rb b/app/models/commercial.rb index 49d09b95a..c62a34ab9 100644 --- a/app/models/commercial.rb +++ b/app/models/commercial.rb @@ -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