Skip to content

Commit

Permalink
another lock refresh tweak. (#6558)
Browse files Browse the repository at this point in the history
  • Loading branch information
landreev committed Apr 2, 2020
1 parent 7dd277d commit 3d21e9d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3d21e9d

Please sign in to comment.