data tree BUGFIX do not remove dflt from nodes
... when adding new metadata. Remove it only
for NP containers.
diff --git a/src/tree_data.c b/src/tree_data.c
index 758bd2a..f0c4e89 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -1770,7 +1770,7 @@
}
/* remove default flags from NP containers */
- while (parent && (parent->flags & LYD_DEFAULT)) {
+ while (parent && (parent->schema->nodetype == LYS_CONTAINER) && (parent->flags & LYD_DEFAULT)) {
parent->flags &= ~LYD_DEFAULT;
parent = (struct lyd_node *)parent->parent;
}