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

This commit is contained in:
Tim Donohue
2023-09-20 15:17:34 -05:00
parent 97479a2945
commit 229236634a

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,