mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Merge pull request #9662 from Icinga/Repair#9627
Repair DSL Namespace values being constant broken in #9627
This commit is contained in:
commit
bda8be343b
@ -58,7 +58,7 @@ void Namespace::Set(const String& field, const Value& value, bool isConst, const
|
||||
auto nsVal = m_Data.find(field);
|
||||
|
||||
if (nsVal == m_Data.end()) {
|
||||
m_Data[field] = NamespaceValue{value, isConst};
|
||||
m_Data[field] = NamespaceValue{value, isConst || m_ConstValues};
|
||||
} else {
|
||||
if (nsVal->second.Const) {
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Constant must not be modified.", debugInfo));
|
||||
|
@ -36,7 +36,7 @@ INITIALIZE_ONCE_WITH_PRIORITY([]() {
|
||||
l_StatsNS = new Namespace(true);
|
||||
globalNS->Set("StatsFunctions", l_StatsNS, true);
|
||||
|
||||
globalNS->Set("Internal", new Namespace(true), true);
|
||||
globalNS->Set("Internal", new Namespace(), true);
|
||||
}, InitializePriority::CreateNamespaces);
|
||||
|
||||
INITIALIZE_ONCE_WITH_PRIORITY([]() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user