From 9f9e6f6db963b6e84e60984349e1ccc3edf39fb1 Mon Sep 17 00:00:00 2001 From: amentis Date: Tue, 14 May 2024 11:49:43 +0300 Subject: [PATCH] external identifier fix for description finalization --- .../model/persist/descriptionproperties/FieldPersist.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java index c80917440..0ffead771 100644 --- a/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java +++ b/backend/core/src/main/java/org/opencdmp/model/persist/descriptionproperties/FieldPersist.java @@ -170,7 +170,7 @@ public class FieldPersist { .over(item.getReference()) .using(() -> this.validatorFactory.validator(ReferencePersist.ReferenceWithoutTypePersistValidator.class)), this.refSpec() - .iff(() -> FieldType.isExternalIdentifierType(fieldType) && !this.isNull(item.getExternalIdentifier())) + .iff(() -> FieldType.isExternalIdentifierType(fieldType) && !this.isNull(item.getExternalIdentifier()) && DescriptionStatus.Finalized.equals(this.status) && isVisible && required) .on(FieldPersist._externalIdentifier) .over(item.getExternalIdentifier()) .using(() -> this.validatorFactory.validator(ExternalIdentifierPersist.PersistValidator.class))