From 884b3684fefb61d968f27b82039f30a93a8a5479 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; /**