Fixed exception on project info page, when BOM contained non part entries

This commit is contained in:
Jan Böhmer 2022-12-24 16:28:57 +01:00
parent 64e7ce4ad6
commit 4e3cad577e

View file

@ -67,7 +67,11 @@ class EntityColumn extends AbstractColumn
$resolver->setDefault('render', function (Options $options) { $resolver->setDefault('render', function (Options $options) {
return function ($value, $context) use ($options) { return function ($value, $context) use ($options) {
/** @var AbstractNamedDBElement|null $entity */ /** @var AbstractNamedDBElement|null $entity */
if ($this->accessor->isReadable($context, $options['property'])) {
$entity = $this->accessor->getValue($context, $options['property']); $entity = $this->accessor->getValue($context, $options['property']);
} else {
$entity = null;
}
if (null !== $entity) { if (null !== $entity) {
if (null !== $entity->getID()) { if (null !== $entity->getID()) {