From e59b0929eded9fe343b1e31b3cc3b8d81cb0101b Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Tue, 3 Sep 2019 16:11:31 +0200 Subject: [PATCH] 64503: Default metadataConfigID --- .../collection-source/collection-source.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts b/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts index 3a87f11910..a050443353 100644 --- a/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts +++ b/src/app/+collection-page/edit-collection-page/collection-source/collection-source.component.ts @@ -269,19 +269,21 @@ export class CollectionSourceComponent extends AbstractTrackableComponent implem this.updateSub = this.update$.subscribe((update: FieldUpdate) => { if (update) { const field = update.field as ContentSource; + const defaultConfigId = this.contentSource.metadataConfigs[0].id; this.formGroup.patchValue({ oaiSourceContainer: { oaiSource: field.oaiSource }, oaiSetContainer: { oaiSetId: field.oaiSetId, - metadataConfigId: field.metadataConfigId + metadataConfigId: field.metadataConfigId || defaultConfigId }, harvestTypeContainer: { harvestType: field.harvestType } }); this.contentSource = cloneDeep(field); + this.contentSource.metadataConfigId = defaultConfigId; } }); }