Fix bug where linked Community/Collection info was sometimes listed many times in a row

(cherry picked from commit 229236634a)
This commit is contained in:
Tim Donohue
2023-09-20 15:17:34 -05:00
committed by github-actions[bot]
parent d7ccce1f8f
commit c02cfff8da

View File

@@ -230,12 +230,14 @@ export class GroupFormComponent implements OnInit, OnDestroy {
this.groupBeingEdited = activeGroup; this.groupBeingEdited = activeGroup;
if (linkedObject?.name) { if (linkedObject?.name) {
if (!this.formGroup.controls.groupCommunity) {
this.formBuilderService.insertFormGroupControl(1, this.formGroup, this.formModel, this.groupCommunity); this.formBuilderService.insertFormGroupControl(1, this.formGroup, this.formModel, this.groupCommunity);
this.formGroup.patchValue({ this.formGroup.patchValue({
groupName: activeGroup.name, groupName: activeGroup.name,
groupCommunity: linkedObject?.name ?? '', groupCommunity: linkedObject?.name ?? '',
groupDescription: activeGroup.firstMetadataValue('dc.description'), groupDescription: activeGroup.firstMetadataValue('dc.description'),
}); });
}
} else { } else {
this.formModel = [ this.formModel = [
this.groupName, this.groupName,