Check criteria
This commit is contained in:
parent
be3ebb1231
commit
0576a036f6
@ -95,7 +95,7 @@ public class CredentialSubjectProbe extends Probe<JsonNode> {
|
||||
}
|
||||
// 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user