procedure publiee must have one zone at least

This commit is contained in:
Christophe Robillard 2022-09-27 19:22:42 +02:00 committed by krichtof
parent 2985295a00
commit bdcb451d3c
6 changed files with 28 additions and 10 deletions

View file

@ -289,6 +289,7 @@ class Procedure < ApplicationRecord
validates :lien_dpo, email_or_link: true, allow_nil: true
validates_with MonAvisEmbedValidator
validates :zones, presence: true, if: -> record { record.publiee? && Flipper.enabled?(:zonage) }
FILE_MAX_SIZE = 20.megabytes
validates :notice, content_type: [