mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 14:06:45 +01:00
Fixed exception on project info page, when BOM contained non part entries
This commit is contained in:
@@ -67,7 +67,11 @@ class EntityColumn extends AbstractColumn
|
||||
$resolver->setDefault('render', function (Options $options) {
|
||||
return function ($value, $context) use ($options) {
|
||||
/** @var AbstractNamedDBElement|null $entity */
|
||||
$entity = $this->accessor->getValue($context, $options['property']);
|
||||
if ($this->accessor->isReadable($context, $options['property'])) {
|
||||
$entity = $this->accessor->getValue($context, $options['property']);
|
||||
} else {
|
||||
$entity = null;
|
||||
}
|
||||
|
||||
if (null !== $entity) {
|
||||
if (null !== $entity->getID()) {
|
||||
|
||||
Reference in New Issue
Block a user