FIX: wasn't able to update category's settings

This commit is contained in:
Régis Hanol
2016-08-09 20:14:49 +02:00
parent 28a12510dd
commit 282f9948cb
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ class UploadUrlValidator < ActiveModel::EachValidator
if value.present?
uri = URI.parse(value) rescue nil
unless uri && Upload.exists?(url: value)
unless uri && Discourse.store.has_been_uploaded?(value)
record.errors[attribute] << (options[:message] || I18n.t('errors.messages.invalid'))
end
end