From 3f381c207d0042b8ce64ff6730ef1532d2413e2d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 5 Nov 2024 15:28:52 +0100 Subject: [PATCH] Add a notnull constraint on property 'type' when creating an event status --- src/Bundle/ChillEventBundle/Entity/Status.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillEventBundle/Entity/Status.php b/src/Bundle/ChillEventBundle/Entity/Status.php index 38c07879c..89ec9e8b9 100644 --- a/src/Bundle/ChillEventBundle/Entity/Status.php +++ b/src/Bundle/ChillEventBundle/Entity/Status.php @@ -36,6 +36,7 @@ class Status private $name; #[ORM\ManyToOne(targetEntity: EventType::class, inversedBy: 'statuses')] + #[Assert\NotNull(message: 'An event status must be linked to an event type.')] private ?EventType $type = null; /**