Explicitly check not-null oldLabel. Lowercase old label.
1 parent e48c632 commit 2576a3a859f351908e8a565eb88d52d1563a3f18
@Alex Tucker Alex Tucker authored on 15 Oct 2018
Showing 1 changed file
View
4
vars/uploadTidy.groovy
String datasetGraph = "${baseURI}/graph/${datasetPath}"
String metadataGraph = "${datasetGraph}/metadata"
drafter.deleteGraph(PMD, credentials, newJobDraft.id, metadataGraph)
drafter.deleteGraph(PMD, credentials, newJobDraft.id, datasetGraph)
if (oldLabel) {
String oldDatasetPath = oldLabel
if (oldLabel != null) {
String oldDatasetPath = oldLabel.toLowerCase()
.replaceAll('[^\\w/]', '-')
.replaceAll('-+', '-')
.replaceAll('-\$', '')
String oldDatasetGraph = "${baseURI}/graph/${oldDatasetPath}"