DirectorObjectForm: handle object_type only if such

This commit is contained in:
Thomas Gelf 2015-08-03 13:39:12 +02:00
parent 0b4c4d6538
commit c26f2ed087

View File

@ -429,7 +429,7 @@ abstract class DirectorObjectForm extends QuickForm
$object = $this->object();
if ($object instanceof IcingaObject) {
if (! $object->hasBeenLoadedFromDb()) {
if (! $object->hasBeenLoadedFromDb() && $object->hasProperty('object_type')) {
$object->object_type = $this->objectType;
}
$this->handleImports($object, $values);