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) {
this.formBuilderService.insertFormGroupControl(1, this.formGroup, this.formModel, this.groupCommunity); if (!this.formGroup.controls.groupCommunity) {
this.formGroup.patchValue({ this.formBuilderService.insertFormGroupControl(1, this.formGroup, this.formModel, this.groupCommunity);
groupName: activeGroup.name, this.formGroup.patchValue({
groupCommunity: linkedObject?.name ?? '', groupName: activeGroup.name,
groupDescription: activeGroup.firstMetadataValue('dc.description'), groupCommunity: linkedObject?.name ?? '',
}); groupDescription: activeGroup.firstMetadataValue('dc.description'),
});
}
} else { } else {
this.formModel = [ this.formModel = [
this.groupName, this.groupName,