mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
IcingaDB: handle null (Empty) for value/set_if/separator in command arguments
Icinga 2 treats null (Empty) as if the corresponding attribute is not specified. However, without this commit, it would serialize the value as "null" (i.e. type string), so that it ends up in the database as this string instead of NULL. This commit adds handling for ValueEmpty so that is serialized as JSON null value and ends up in the database as NULL.
This commit is contained in:
parent
b3d447fd49
commit
46c33bedaf
@ -996,6 +996,7 @@ void IcingaDB::InsertObjectDependencies(const ConfigObject::Ptr& object, const S
|
||||
// Stringify if set.
|
||||
if (values->Get(attr, &value)) {
|
||||
switch (value.GetType()) {
|
||||
case ValueEmpty:
|
||||
case ValueString:
|
||||
break;
|
||||
case ValueObject:
|
||||
|
Loading…
x
Reference in New Issue
Block a user