From 9244fe5944cccf938d6b6e6c19380f741ac8d9b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 3 Apr 2023 22:23:53 +0200 Subject: [PATCH] Fixed internal server error, when using owner placeholder on stored label profile --- src/Entity/Parts/PartLot.php | 2 +- src/Entity/Parts/Storelocation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entity/Parts/PartLot.php b/src/Entity/Parts/PartLot.php index 155f844c..e3f0fcef 100644 --- a/src/Entity/Parts/PartLot.php +++ b/src/Entity/Parts/PartLot.php @@ -118,7 +118,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\User") * @ORM\JoinColumn(name="id_owner", referencedColumnName="id", nullable=true, onDelete="SET NULL") */ - protected ?User $owner; + protected ?User $owner = null; public function __clone() { diff --git a/src/Entity/Parts/Storelocation.php b/src/Entity/Parts/Storelocation.php index 1aa0b2b5..6ea009e2 100644 --- a/src/Entity/Parts/Storelocation.php +++ b/src/Entity/Parts/Storelocation.php @@ -95,7 +95,7 @@ class Storelocation extends AbstractPartsContainingDBElement * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\User") * @ORM\JoinColumn(name="id_owner", referencedColumnName="id", nullable=true, onDelete="SET NULL") */ - protected ?User $owner; + protected ?User $owner = null; /** * @var bool If this is set to true, only parts lots, which are owned by the same user as the store location are allowed to be stored here.