mirror of https://github.com/Icinga/icinga2.git
parent
70062b5884
commit
8d81f4b90a
|
@ -532,7 +532,7 @@ Value AExpression::OpObject(const AExpression* expr, const Dictionary::Ptr& loca
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkName.IsEmpty()) {
|
if (!checkName.IsEmpty()) {
|
||||||
ConfigItem::Ptr oldItem = ConfigItem::GetObject(type, name);
|
ConfigItem::Ptr oldItem = ConfigItem::GetObject(type, checkName);
|
||||||
|
|
||||||
if (oldItem) {
|
if (oldItem) {
|
||||||
std::ostringstream msgbuf;
|
std::ostringstream msgbuf;
|
||||||
|
|
|
@ -129,7 +129,7 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
|
||||||
const DynamicObjectNameHelper *nh = dynamic_cast<const DynamicObjectNameHelper *>(Type::GetByName(m_Type));
|
const DynamicObjectNameHelper *nh = dynamic_cast<const DynamicObjectNameHelper *>(Type::GetByName(m_Type));
|
||||||
|
|
||||||
if (nh) {
|
if (nh) {
|
||||||
String name = nh->MakeObjectName(m_Name, m_Properties);
|
name = nh->MakeObjectName(m_Name, m_Properties);
|
||||||
|
|
||||||
if (name.IsEmpty())
|
if (name.IsEmpty())
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Could not determine name for object"));
|
BOOST_THROW_EXCEPTION(std::runtime_error("Could not determine name for object"));
|
||||||
|
|
Loading…
Reference in New Issue