fix createRelated

This commit is contained in:
yuri
2015-05-26 11:30:25 +03:00
parent 0038c3666d
commit 45c59ff242
@@ -143,6 +143,12 @@ class Notification extends \Espo\Core\Services\Base
$note->set('parentName', $parent->get('name'));
}
}
if ($note->get('relatedId') && $note->get('relatedType')) {
$related = $this->getEntityManager()->getEntity($note->get('relatedType'), $note->get('relatedId'));
if ($related) {
$note->set('relatedName', $related->get('name'));
}
}
$entity->set('noteData', $note->toArray());
} else {
unset($collection[$k]);