diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md index 5b770089b..9aa6f0764 100644 --- a/doc/9-icinga2-api.md +++ b/doc/9-icinga2-api.md @@ -274,7 +274,7 @@ For example when querying objects of type `Host` the variable in the filter expr `host`. Additionally related objects such as the host's check command are also made available (e.g., via the `check_command` variable). -The object is also made available via the `object` variable. This makes it easier to build +The object is also made available via the `obj` variable. This makes it easier to build filters which can be used for more than one object type (e.g., for permissions). > **Note** diff --git a/lib/remote/filterutility.cpp b/lib/remote/filterutility.cpp index a0e51f851..aa5e6417b 100644 --- a/lib/remote/filterutility.cpp +++ b/lib/remote/filterutility.cpp @@ -112,7 +112,7 @@ bool FilterUtility::EvaluateFilter(ScriptFrame& frame, Expression *filter, } else vars = frame.Self; - vars->Set("object", target); + vars->Set("obj", target); vars->Set(varName, target); for (int fid = 0; fid < type->GetFieldCount(); fid++) {