From f11aab6c1929082b8a1962cd94b2b0fff38b9f8f Mon Sep 17 00:00:00 2001 From: triphora Date: Thu, 29 Dec 2022 18:55:00 -0500 Subject: [PATCH] SPDX: Fix niche issue with checkbox (#825) --- pages/_type/_id/edit.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/_type/_id/edit.vue b/pages/_type/_id/edit.vue index 31894c68e..647a90f00 100644 --- a/pages/_type/_id/edit.vue +++ b/pages/_type/_id/edit.vue @@ -715,7 +715,10 @@ export default { licenseId() { let id = '' - if (this.nonSpdxLicense || this.license.short === 'All-Rights-Reserved') + if ( + (this.nonSpdxLicense && this.license.friendly === 'Custom') || + this.license.short === 'All-Rights-Reserved' + ) id += 'LicenseRef-' id += this.license.short @@ -723,7 +726,8 @@ export default { if (this.license.requiresOnlyOrLater) id += this.allowOrLater ? '-or-later' : '-only' - if (this.nonSpdxLicense) id.replaceAll(' ', '-') + if (this.nonSpdxLicense && this.license.short === 'Custom') + id.replaceAll(' ', '-') return id },