Commits
Tim Donohue authored 229236634a0
223 223 | ]).subscribe(([activeGroup, canEdit, linkedObject]) => { |
224 224 | |
225 225 | if (activeGroup != null) { |
226 226 | |
227 227 | // Disable group name exists validator |
228 228 | this.formGroup.controls.groupName.clearAsyncValidators(); |
229 229 | |
230 230 | this.groupBeingEdited = activeGroup; |
231 231 | |
232 232 | if (linkedObject?.name) { |
233 - | this.formBuilderService.insertFormGroupControl(1, this.formGroup, this.formModel, this.groupCommunity); |
234 - | this.formGroup.patchValue({ |
235 - | groupName: activeGroup.name, |
236 - | groupCommunity: linkedObject?.name ?? '', |
237 - | groupDescription: activeGroup.firstMetadataValue('dc.description'), |
238 - | }); |
233 + | if (!this.formGroup.controls.groupCommunity) { |
234 + | this.formBuilderService.insertFormGroupControl(1, this.formGroup, this.formModel, this.groupCommunity); |
235 + | this.formGroup.patchValue({ |
236 + | groupName: activeGroup.name, |
237 + | groupCommunity: linkedObject?.name ?? '', |
238 + | groupDescription: activeGroup.firstMetadataValue('dc.description'), |
239 + | }); |
240 + | } |
239 241 | } else { |
240 242 | this.formModel = [ |
241 243 | this.groupName, |
242 244 | this.groupDescription, |
243 245 | ]; |
244 246 | this.formGroup.patchValue({ |
245 247 | groupName: activeGroup.name, |
246 248 | groupDescription: activeGroup.firstMetadataValue('dc.description'), |
247 249 | }); |
248 250 | } |