data tree BUGFIX lyd_insert() was unable to add data into rpc and notifications
diff --git a/src/tree_data.c b/src/tree_data.c
index 227f226..2527a34 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -476,7 +476,7 @@
/* check placing the node to the appropriate place according to the schema */
sparent = node->schema->parent;
- while (!(sparent->nodetype & (LYS_CONTAINER | LYS_LIST))) {
+ while (!(sparent->nodetype & (LYS_CONTAINER | LYS_LIST | LYS_RPC | LYS_NOTIF))) {
sparent = sparent->parent;
}
if (sparent != parent->schema) {