Skip double validation when container present

pull/9686/head
Oliver Günther 3 years ago
parent 7c25932f94
commit bf30ad0d98
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 2
      app/contracts/attachments/create_contract.rb

@ -49,6 +49,8 @@ module Attachments
private
def validate_attachments_addable
return if model.container
if Redmine::Acts::Attachable.attachables.none?(&:attachments_addable?)
errors.add(:base, :error_unauthorized)
end

Loading…
Cancel
Save