Skip to content

Commit 336359d

Browse files
authored
Merge pull request #80 from mderuijter/dd-484-empty-custom-license-only-fields-before-saving-standard-license
DD-484 empty custom license only fields before saving standard license
2 parents 8f1969c + ec4fd30 commit 336359d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/edu/harvard/iq/dataverse/DatasetPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3606,6 +3606,7 @@ private void setLicense(DatasetVersion editVersion) throws FetchException {
36063606
} else {
36073607
License license = licenseServiceBean.getById(licenseId);
36083608
terms.setLicense(license);
3609+
terms.clearCustomTermsVariables();
36093610
}
36103611
}
36113612

src/main/java/edu/harvard/iq/dataverse/TermsOfUseAndAccess.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,17 @@ public edu.harvard.iq.dataverse.License getCC0() {
278278
edu.harvard.iq.dataverse.License license = new edu.harvard.iq.dataverse.License("CC0", shortDescription, uri, iconUrl, true);
279279
return license;
280280
}
281+
282+
public void clearCustomTermsVariables(){
283+
termsOfUse = null;
284+
confidentialityDeclaration = null;
285+
specialPermissions = null;
286+
restrictions = null;
287+
citationRequirements = null;
288+
depositorRequirements = null;
289+
conditions = null;
290+
disclaimer = null;
291+
}
281292

282293
/**
283294
* @todo What does the GUI use for a default license? What does the "native"

0 commit comments

Comments
 (0)