Distinguish between creating list instances and presence containers
The interpreter now correctly calls the right method depending on the
type of node created.
Change-Id: Ic89a0819e37a23654d4322e80a0cb7d66f38b9d8
diff --git a/src/interpreter.cpp b/src/interpreter.cpp
index e08eab2..eca4879 100644
--- a/src/interpreter.cpp
+++ b/src/interpreter.cpp
@@ -75,7 +75,10 @@
void Interpreter::operator()(const create_& create) const
{
- m_datastore.createPresenceContainer(absolutePathFromCommand(create));
+ if (create.m_path.m_nodes.back().m_suffix.type() == typeid(listElement_))
+ m_datastore.createListInstance(absolutePathFromCommand(create));
+ else
+ m_datastore.createPresenceContainer(absolutePathFromCommand(create));
}
void Interpreter::operator()(const delete_& delet) const