DirectorObjectForm: postpone "dummy" object creation

This commit is contained in:
Thomas Gelf 2015-08-02 15:08:56 +02:00
parent 02daf8b97a
commit ea2add6dc0

View File

@ -403,7 +403,6 @@ abstract class DirectorObjectForm extends QuickForm
protected function onRequest()
{
$object = $this->object();
$values = array();
if ($this->hasBeenSent()) {
@ -416,6 +415,8 @@ abstract class DirectorObjectForm extends QuickForm
}
}
$object = $this->object();
if ($object instanceof IcingaObject) {
if (! $object->hasBeenLoadedFromDb()) {
$object->object_type = $this->objectType;