diff --git a/src/main/java/cz/cvut/kbss/study/service/repository/RepositoryPatientRecordService.java b/src/main/java/cz/cvut/kbss/study/service/repository/RepositoryPatientRecordService.java index 896c5c4..bb30ada 100644 --- a/src/main/java/cz/cvut/kbss/study/service/repository/RepositoryPatientRecordService.java +++ b/src/main/java/cz/cvut/kbss/study/service/repository/RepositoryPatientRecordService.java @@ -73,6 +73,9 @@ protected void prePersist(PatientRecord instance) { @Override protected void preUpdate(PatientRecord instance) { + if(instance.getPhase() != RecordPhase.rejected) { + instance.setRejectMessage(null); + } instance.setLastModifiedBy(securityUtils.getCurrentUser()); instance.setLastModified(new Date()); recordDao.requireUniqueNonEmptyLocalName(instance);