Skip to content

Commit 5890743

Browse files
moved the if condition with uploadNewEndpoint() before the approveCollection()
1 parent 4bfcbf2 commit 5890743

File tree

1 file changed

+4
-4
lines changed
  • zebedee-cms/src/main/java/com/github/onsdigital/zebedee/model/approval

1 file changed

+4
-4
lines changed

zebedee-cms/src/main/java/com/github/onsdigital/zebedee/model/approval/ApproveTask.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ private boolean doApproval() throws Exception {
164164
compressZipFiles(collection, collectionReader, collectionWriter);
165165
eventLog.compressedZipFiles();
166166

167+
if (Configuration.isUploadNewEndpointEnabled() && DatasetWhitelistChecker.isURIWhitelisted(collectionReader)) {
168+
uploadNewEndpoint(collection, collectionReader);
169+
}
170+
167171
approveCollection();
168172
eventLog.approvalStateSet();
169173

@@ -175,10 +179,6 @@ private boolean doApproval() throws Exception {
175179
info().data("user", session.getEmail()).data("collectionId", collection.getDescription().getId())
176180
.log("approve task: collection approve task completed successfully");
177181

178-
if (Configuration.isUploadNewEndpointEnabled() && DatasetWhitelistChecker.isURIWhitelisted(collectionReader)) {
179-
uploadNewEndpoint(collection, collectionReader);
180-
}
181-
182182
return collection != null;
183183

184184
} catch (Exception e) {

0 commit comments

Comments
 (0)