Skip to content

Commit 7e6b0d5

Browse files
committed
tree data BUGFIX do not create default obsolete nodes
Refs sysrepo/sysrepo#3621
1 parent 96993aa commit 7e6b0d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tree_data_new.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,8 @@ lyd_new_implicit(struct lyd_node *parent, struct lyd_node **first, const struct
19731973
continue;
19741974
} else if ((impl_opts & LYD_IMPLICIT_NO_CONFIG) && (snode->flags & LYS_CONFIG_W)) {
19751975
continue;
1976+
} else if (snode->flags & LYS_STATUS_OBSLT) {
1977+
continue;
19761978
}
19771979

19781980
node = lys_getnext_data(NULL, *first, NULL, snode, NULL);
@@ -1996,6 +1998,8 @@ lyd_new_implicit(struct lyd_node *parent, struct lyd_node **first, const struct
19961998
continue;
19971999
} else if ((impl_opts & LYD_IMPLICIT_NO_CONFIG) && (snode->flags & LYS_CONFIG_W)) {
19982000
continue;
2001+
} else if (snode->flags & LYS_STATUS_OBSLT) {
2002+
continue;
19992003
}
20002004

20012005
switch (snode->nodetype) {

0 commit comments

Comments
 (0)