diff --git a/src/Entity/JobProfile.php b/src/Entity/JobProfile.php index 4104c83..e60e66b 100644 --- a/src/Entity/JobProfile.php +++ b/src/Entity/JobProfile.php @@ -129,6 +129,10 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa public function getCategoryLabel(): ?string { + if (null === $this->category) { + return null; + } + return self::getCategories()[$this->category] ?? null; }