Skip to content

Commit

Permalink
If never validated and required then set status to never validated.
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwallen committed Oct 4, 2023
1 parent 578a8b8 commit 64537f2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,11 @@ public void indexMetadata(final String metadataId,

// TODO: Check if ignore INSPIRE validation?
if (!type.equalsIgnoreCase("inspire")) {
if (status == MetadataValidationStatus.INVALID && vi.isRequired()) {
// If never validated and required then set status to never validated.
if (status == MetadataValidationStatus.NEVER_CALCULATED && vi.isRequired()) {
isValid = "-1";
}
if (status == MetadataValidationStatus.INVALID && vi.isRequired() && isValid != "-1") {
isValid = "0";
}
} else {
Expand Down

0 comments on commit 64537f2

Please sign in to comment.