From 8c2ad920b1f08f2dbe39904648200a4afca3be42 Mon Sep 17 00:00:00 2001 From: Fatimah Zulfiqar Date: Tue, 17 Dec 2024 16:09:31 +0100 Subject: [PATCH] rights: fix serialize condition for controlled license --- .../src/deposit/serializers/RightsVocabularyField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/serializers/RightsVocabularyField.js b/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/serializers/RightsVocabularyField.js index b588f0b9a..7200d7e79 100644 --- a/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/serializers/RightsVocabularyField.js +++ b/invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records/src/deposit/serializers/RightsVocabularyField.js @@ -82,7 +82,7 @@ export class RightsVocabularyField extends VocabularyField { let serializedValue = null; const _serialize = (value) => { let clonedValue = _cloneDeep(value); - if ("id" in value) { + if ("id" in value && value.id != null) { return { id: value.id }; } else { this.localeFields.forEach((field) => {