DirectorObjectForm: fix redirect for related objects

CommandArguments and similar are also IcingaObjects, but have no
object_name
This commit is contained in:
Thomas Gelf 2015-11-14 17:51:25 +01:00
parent dbe61f3911
commit 49f28b27ef
1 changed files with 1 additions and 1 deletions

View File

@ -391,7 +391,7 @@ abstract class DirectorObjectForm extends QuickForm
$object = $this->object(); $object = $this->object();
if ($object->hasBeenModified()) { if ($object->hasBeenModified()) {
if (! $object->hasBeenLoadedFromDb()) { if (! $object->hasBeenLoadedFromDb()) {
if ($object instanceof IcingaObject) { if ($object instanceof IcingaObject && $object->hasProperty('object_name')) {
$this->setSuccessUrl( $this->setSuccessUrl(
'director/' . strtolower($this->getObjectName()), 'director/' . strtolower($this->getObjectName()),
array('name' => $object->object_name) array('name' => $object->object_name)