diff --git a/app/models/legal_document.rb b/app/models/legal_document.rb index c22d98025..e807ae2f7 100644 --- a/app/models/legal_document.rb +++ b/app/models/legal_document.rb @@ -10,7 +10,7 @@ class LegalDocument < ActiveRecord::Base belongs_to :documentable, polymorphic: true - validates :body, length: { minimum: (1.37 * 8.kilobytes).ceil }, unless: :path + validates :body, length: { minimum: (1.37 * 8.kilobytes).ceil }, if: ->(file){ file.path.blank? && !Rails.env.staging?} before_create :add_creator before_save :save_to_filesystem