Commit 0ac59534 authored by Navid Sassan's avatar Navid Sassan
Browse files

fixed another problem with the datalist import

parent 85e7e026
......@@ -2,6 +2,7 @@
namespace Icinga\Module\Director\Objects;
use Icinga\Exception\NotFoundError;
use Icinga\Module\Director\Core\Json;
use Icinga\Module\Director\Data\Db\DbObjectWithSettings;
use Icinga\Module\Director\Db;
......@@ -77,10 +78,14 @@ class DirectorDatafield extends DbObjectWithSettings
$plain->settings = (object) $this->getSettings();
if (property_exists($plain->settings, 'datalist_id')) {
// It is possible that the datalist does not exists yet, but is part of the new basket
try {
$plain->settings->datalist = DirectorDatalist::loadWithAutoIncId(
} catch (NotFoundError $e) {
Name: Icinga Director
Depends: reactbundle (>=0.7.0), ipl (>=0.3.0), incubator (>=0.5.0)
Description: Director - Config tool for Icinga 2
Icinga Director is a configuration tool that has been designed to make
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment