plugin types BUGFIX avoid checking unresolved when
... for leafref validation. The data tree may be
non-validated.
Fixes sysrepo/sysrepo#2528
diff --git a/src/plugins_types.c b/src/plugins_types.c
index bb43e05..18e0143 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -790,7 +790,7 @@
/* find all target data instances */
ret = lyxp_eval(LYD_CTX(node), lref->path, node->schema->module, LY_VALUE_SCHEMA_RESOLVED, lref->prefixes,
- node, tree, &set, 0);
+ node, tree, &set, LYXP_IGNORE_WHEN);
if (ret) {
ret = LY_ENOTFOUND;
val_str = lref->plugin->print(LYD_CTX(node), value, LY_VALUE_CANON, NULL, NULL, NULL);