Skip to content

Commit 9dd623b

Browse files
atarix83Andrea Barbasso
authored andcommitted
Merged in task/dspace-cris-2025_02_X/DSC-2876 (pull request DSpace#4525)
[DSC-2876] fix: handle string authority values in section-form-operations service Approved-by: Andrea Barbasso
2 parents 4381651 + f3e69cd commit 9dd623b

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
@@ -250,7 +250,11 @@ export class SectionFormOperationsService {
250250
if ((event.model as DsDynamicInputModel).hasAuthority) {
251251
if (Array.isArray(value)) {
252252
value.forEach((authority, index) => {
253-
authority = Object.assign(new VocabularyEntry(), authority, { language });
253+
if (typeof authority === 'string') {
254+
authority = Object.assign(new VocabularyEntry(), { value: authority, language });
255+
} else {
256+
authority = Object.assign(new VocabularyEntry(), authority, { language });
257+
}
254258
value[index] = authority;
255259
});
256260
fieldValue = value;

0 commit comments

Comments
 (0)