diff --git a/src/Entity/Department.php b/src/Entity/Department.php index 6331d63..dd0ec84 100644 --- a/src/Entity/Department.php +++ b/src/Entity/Department.php @@ -85,7 +85,7 @@ class Department implements DBElementInterface, NamedElementInterface, Timestamp */ #[ORM\ManyToMany(targetEntity: Confirmer::class, inversedBy: 'departments')] #[ORM\JoinTable(name: 'departments_confirmers')] - #[Assert\Expression("value.count() >= this.gettype().getMinimumRequiredConfirmers()", + #[Assert\Expression("value.count() >= this.gettype().getMinimumRequiredConfirmers() or this.isBlocked()", message: 'validator.two_few_confirmers')] #[Assert\Unique] private Collection $confirmers; diff --git a/translations/validators.de.xlf b/translations/validators.de.xlf index db842d9..28480d8 100644 --- a/translations/validators.de.xlf +++ b/translations/validators.de.xlf @@ -59,7 +59,8 @@ validator.two_few_confirmers Zu wenige Bestätigungspersonen! -Ein FSR benötigt mindestens 2 Bestätigungspersonen, Referate mindestens 1 Person! +Ein FSR benötigt mindestens 2 Bestätigungspersonen, Referate mindestens 1 Person! +(Alternativ kann die Struktur gesperrt werden)