Fix yet another validation issue.

Refs #5925
This commit is contained in:
Gunnar Beutner 2014-04-05 23:15:56 +02:00 committed by Gunnar Beutner
parent 8d81f4b90a
commit 020eaf99ab
2 changed files with 9 additions and 2 deletions

View File

@ -117,10 +117,8 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
if (!m_Properties) {
m_Properties = make_shared<Dictionary>();
m_Properties->Set("type", m_Type);
m_Properties->Set("name", m_Name);
m_Properties->Set("__parent", m_Scope);
GetExpressionList()->Evaluate(m_Properties);
m_Properties->Remove("name");
m_Properties->Remove("__parent");
String name = m_Name;
@ -136,6 +134,9 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
}
}
if (name != m_Name)
m_Properties->Set("name", m_Name);
m_Properties->Set("__name", name);
VERIFY(m_Properties->Get("type") == GetType());

View File

@ -85,6 +85,8 @@
%attribute %name(Host) "host_name",
%attribute %string "service_name",
%attribute %string "name",
%attribute %array "users" {
%attribute %name(User) "*"
},
@ -191,6 +193,8 @@
%attribute %name(Host) "host_name",
%attribute %string "service_name",
%attribute %string "name",
%require "author",
%attribute %string "author",
@ -215,6 +219,8 @@
%attribute %name(Host) "child_host_name",
%attribute %string "child_service_name",
%attribute %string "name",
%attribute %name(TimePeriod) "period",
%attribute %number "state_filter",