data tree BUGFIX set default flags for NP conts
... as mentioned in the docs.
diff --git a/src/tree_data.c b/src/tree_data.c
index 8e5fed4..b40bdbb 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -576,6 +576,9 @@
in->schema = schema;
in->prev = (struct lyd_node *)in;
in->flags = LYD_NEW;
+ if ((schema->nodetype == LYS_CONTAINER) && !(schema->flags & LYS_PRESENCE)) {
+ in->flags |= LYD_DEFAULT;
+ }
/* do not hash list with keys, we need them for the hash */
if ((schema->nodetype != LYS_LIST) || (schema->flags & LYS_KEYLESS)) {