From 0576a036f6061d0b3e3ff0ddf1e4900a768a1c77 Mon Sep 17 00:00:00 2001 From: Xavi Aracil Date: Tue, 3 Oct 2023 10:55:09 -0400 Subject: [PATCH] Check criteria --- .../org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java index 37c917b..a97f00b 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/CredentialSubjectProbe.java @@ -95,7 +95,7 @@ public class CredentialSubjectProbe extends Probe { } // criteria must have id or narrative JsonNode criteria = achievement.get("criteria"); - if (!criteria.has("id") && !criteria.has("narrative")) { + if (!criteria.hasNonNull("id") && !criteria.hasNonNull("narrative")) { return error("criteria in achievement of credentialSubject must have id or narrative", ctx); } } else if (achivementRequired) {