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