Skip to content

Commit

Permalink
validation UPDATE foreign when dependency error
Browse files Browse the repository at this point in the history
If validating per-module, there can be must
conditions depending on nodes with when conditions
that have not yet been evaluated.
  • Loading branch information
michalvasko committed Nov 8, 2023
1 parent bfc9ce6 commit 2deae4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,8 +1500,8 @@ lyd_validate_must(const struct lyd_node *node, uint32_t val_opts, uint32_t int_o
r = lyxp_eval(LYD_CTX(node), musts[u].cond, node->schema->module, LY_VALUE_SCHEMA_RESOLVED,
musts[u].prefixes, node, node, tree, NULL, &xp_set, LYXP_SCHEMA | xpath_options);
if (r == LY_EINCOMPLETE) {
LOGINT(LYD_CTX(node));
r = LY_EINT;
LOGERR(LYD_CTX(node), LY_EINCOMPLETE,
"Must \"%s\" depends on a node with a when condition, which has not been evaluated.", musts[u].cond->expr);
}
LY_CHECK_ERR_GOTO(r, rc = r, cleanup);

Expand Down

0 comments on commit 2deae4c

Please sign in to comment.