Skip to content

Commit

Permalink
validation OPTIMIZE look only for nodes that can be in set
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Mar 5, 2025
1 parent 8cddbe7 commit f827745
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ lyd_validate_autodel_node_del(struct lyd_node **first, struct lyd_node *del, con
if (node_types && node_types->count) {
/* remove from node_types set */
LYD_TREE_DFS_BEGIN(del, iter) {
if (ly_set_contains(node_types, iter, &idx)) {
if ((iter->schema->nodetype & LYD_NODE_TERM) &&
((struct lysc_node_leaf *)iter->schema)->type->plugin->validate &&
ly_set_contains(node_types, iter, &idx)) {
ly_set_rm_index(node_types, idx, NULL);
}
LYD_TREE_DFS_END(del, iter);
Expand Down

0 comments on commit f827745

Please sign in to comment.