From 787a745c30163f3a3eae6c2e2a3beddff2cf1eb7 Mon Sep 17 00:00:00 2001 From: nscuro Date: Sun, 20 Aug 2023 00:11:31 +0200 Subject: [PATCH] Fix license expression input fields Signed-off-by: nscuro --- src/views/portfolio/projects/ComponentDetailsModal.vue | 3 +++ src/views/portfolio/projects/ProjectAddComponentModal.vue | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/src/views/portfolio/projects/ComponentDetailsModal.vue b/src/views/portfolio/projects/ComponentDetailsModal.vue index 34495c0b1..0f001160d 100644 --- a/src/views/portfolio/projects/ComponentDetailsModal.vue +++ b/src/views/portfolio/projects/ComponentDetailsModal.vue @@ -224,6 +224,7 @@ author: this.component.author, description: this.component.description, license: this.selectedLicense, + licenseExpression: this.component.licenseExpression, licenseUrl: this.component.licenseUrl, filename: this.component.filename, classifier: this.component.classifier, @@ -258,6 +259,8 @@ retrieveLicenses: function() { let url = `${this.$api.BASE_URL}/${this.$api.URL_LICENSE_CONCISE}`; this.axios.get(url).then((response) => { + // Allow for license to be un-selected. + this.selectableLicenses.push({value: '', text: ''}); for (let i = 0; i < response.data.length; i++) { let license = response.data[i]; this.selectableLicenses.push({value: license.licenseId, text: license.name, uuid: license.uuid}); diff --git a/src/views/portfolio/projects/ProjectAddComponentModal.vue b/src/views/portfolio/projects/ProjectAddComponentModal.vue index b3a2146e0..974cc0671 100644 --- a/src/views/portfolio/projects/ProjectAddComponentModal.vue +++ b/src/views/portfolio/projects/ProjectAddComponentModal.vue @@ -48,6 +48,10 @@ + + { + // Allow for license to be un-selected. + this.selectableLicenses.push({value: '', text: ''}); for (let i = 0; i < response.data.length; i++) { let license = response.data[i]; this.selectableLicenses.push({value: license.licenseId, text: license.name});