diff --git a/lib/livestatus/livestatusquery.cpp b/lib/livestatus/livestatusquery.cpp index cc27fab8c..e34da40aa 100644 --- a/lib/livestatus/livestatusquery.cpp +++ b/lib/livestatus/livestatusquery.cpp @@ -636,6 +636,7 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream) expr = ConfigCompiler::CompileText(fileName, m_Command, false); ScriptFrame frame; frame.Locals = lsf.Locals; + frame.Self = lsf.Locals; result = expr->Evaluate(frame); } catch (const ScriptError& ex) { delete expr;