From 3d21e9dffdf675582aed9a9bc492188506da5e26 Mon Sep 17 00:00:00 2001 From: Leonid Andreev Date: Thu, 2 Apr 2020 15:48:49 -0400 Subject: [PATCH] another lock refresh tweak. (#6558) --- .../java/edu/harvard/iq/dataverse/DatasetPage.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index b9b8f279bde..a46d73d186f 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -3655,14 +3655,12 @@ public boolean isStillLockedForAnyReason() { Dataset testDataset = datasetService.find(dataset.getId()); if (testDataset != null && testDataset.getId() != null) { if (testDataset.getLocks().size() > 0) { - if (lockedForAsyncPublish) { - if (testDataset.isLockedFor(DatasetLock.Reason.FileValidationFailed)) { - JH.addMessage(FacesMessage.SEVERITY_ERROR, BundleUtil.getStringFromBundle("dataset.publish.file.validation.error.message"), - BundleUtil.getStringFromBundle("dataset.publish.file.validation.error.contactSupport")); - /* and now that we've shown the message to the user - remove the lock? */ - } else { - displayLockInfo(); - } + if (lockedForAsyncPublish && testDataset.isLockedFor(DatasetLock.Reason.FileValidationFailed)) { + JH.addMessage(FacesMessage.SEVERITY_ERROR, BundleUtil.getStringFromBundle("dataset.publish.file.validation.error.message"), + BundleUtil.getStringFromBundle("dataset.publish.file.validation.error.contactSupport")); + /* and now that we've shown the message to the user - remove the lock? */ + } else { + displayLockInfo(); } return true; }