mirror of
https://github.com/Icinga/icinga2.git
synced 2025-11-24 23:54:05 +01:00
Icinga DB: ensure icinga:*command:argument#order is an int
The config parser requires *Command#arguments#order to be a Number, i.e. 42,
4.2 or even "4.2". That's int-casted where needed, now also for Icinga DB.
Before:
```
object CheckCommand "9117" {
command = [ "true" ]
arguments = {
"4.2" = { order = "4.2" }
}
}
```
2022-01-03T13:25:07.166+0100 FATAL icingadb json: cannot unmarshal string into Go value of type int64
This commit is contained in:
parent
d6a1757cb8
commit
a8c9d19dae
@ -1009,6 +1009,15 @@ void IcingaDB::InsertObjectDependencies(const ConfigObject::Ptr& object, const S
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
Value order;
|
||||
|
||||
// Intify if set.
|
||||
if (values->Get("order", &order)) {
|
||||
values->Set("order", (int)order);
|
||||
}
|
||||
}
|
||||
|
||||
values->Set(objectKeyName, objectKey);
|
||||
values->Set("argument_key", kv.first);
|
||||
values->Set("environment_id", m_EnvironmentId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user