Skip to content

Commit 2b970e1

Browse files
atarix83Andrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2023_02_x/DSC-2876 (pull request DSpace#4529)
[DSC-2876] fix: handle string authority values in section-form-operations service Approved-by: Andrea Barbasso
2 parents 0f65d07 + d1041bc commit 2b970e1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/submission/sections/form/section-form-operations.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ export class SectionFormOperationsService {
241241
if ((event.model as DsDynamicInputModel).hasAuthority) {
242242
if (Array.isArray(value)) {
243243
value.forEach((authority, index) => {
244-
authority = Object.assign(new VocabularyEntry(), authority, {language});
244+
if (typeof authority === 'string') {
245+
authority = Object.assign(new VocabularyEntry(), { value: authority, language });
246+
} else {
247+
authority = Object.assign(new VocabularyEntry(), authority, {language});
248+
}
245249
value[index] = authority;
246250
});
247251
fieldValue = value;

0 commit comments

Comments
 (0)