mirror of https://github.com/Icinga/icinga2.git
IcingaDB: don't always set icinga:config:*command:{argument,envvar}#value
This commit is contained in:
parent
287e4c3a8d
commit
c01c22ae76
|
@ -698,7 +698,15 @@ void IcingaDB::InsertObjectDependencies(const ConfigObject::Ptr& object, const S
|
|||
values = new Dictionary({{"value", kv.second}});
|
||||
}
|
||||
|
||||
values->Set("value", JsonEncode(values->Get("value")));
|
||||
{
|
||||
Value value;
|
||||
|
||||
// JsonEncode() the value if it's set.
|
||||
if (values->Get("value", &value)) {
|
||||
values->Set("value", JsonEncode(value));
|
||||
}
|
||||
}
|
||||
|
||||
values->Set("command_id", objectKey);
|
||||
values->Set("argument_key", kv.first);
|
||||
values->Set("environment_id", envId);
|
||||
|
@ -737,7 +745,15 @@ void IcingaDB::InsertObjectDependencies(const ConfigObject::Ptr& object, const S
|
|||
values = new Dictionary({{"value", kv.second}});
|
||||
}
|
||||
|
||||
values->Set("value", JsonEncode(values->Get("value")));
|
||||
{
|
||||
Value value;
|
||||
|
||||
// JsonEncode() the value if it's set.
|
||||
if (values->Get("value", &value)) {
|
||||
values->Set("value", JsonEncode(value));
|
||||
}
|
||||
}
|
||||
|
||||
values->Set("command_id", objectKey);
|
||||
values->Set("envvar_key", kv.first);
|
||||
values->Set("environment_id", envId);
|
||||
|
|
Loading…
Reference in New Issue