From 2e593a002248de9857a086703d7e29c55965225b Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 2 Apr 2025 10:00:25 -0700 Subject: [PATCH] Fix: fix potential race condition when creating new custom fields on doc details (#9542) --- src-ui/messages.xlf | 36 +++++++++---------- .../document-detail.component.ts | 4 +-- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 7a7e95891..7ea6ab923 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -2541,15 +2541,15 @@ src/app/components/document-detail/document-detail.component.ts - 1325 + 1323 src/app/components/document-detail/document-detail.component.ts - 1364 + 1362 src/app/components/document-detail/document-detail.component.ts - 1405 + 1403 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -3406,7 +3406,7 @@ src/app/components/document-detail/document-detail.component.ts - 1382 + 1380 src/app/guards/dirty-saved-view.guard.ts @@ -7022,35 +7022,35 @@ Split confirm src/app/components/document-detail/document-detail.component.ts - 1323 + 1321 This operation will split the selected document(s) into new documents. src/app/components/document-detail/document-detail.component.ts - 1324 + 1322 Split operation for "" will begin in the background. src/app/components/document-detail/document-detail.component.ts - 1340 + 1338 Error executing split operation src/app/components/document-detail/document-detail.component.ts - 1349 + 1347 Rotate confirm src/app/components/document-detail/document-detail.component.ts - 1362 + 1360 src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -7061,60 +7061,60 @@ This operation will permanently rotate the original version of the current document. src/app/components/document-detail/document-detail.component.ts - 1363 + 1361 Rotation of "" will begin in the background. Close and re-open the document after the operation has completed to see the changes. src/app/components/document-detail/document-detail.component.ts - 1379 + 1377 Error executing rotate operation src/app/components/document-detail/document-detail.component.ts - 1391 + 1389 Delete pages confirm src/app/components/document-detail/document-detail.component.ts - 1403 + 1401 This operation will permanently delete the selected pages from the original document. src/app/components/document-detail/document-detail.component.ts - 1404 + 1402 Delete pages operation for "" will begin in the background. Close and re-open or reload this document after the operation has completed to see the changes. src/app/components/document-detail/document-detail.component.ts - 1419 + 1417 Error executing delete pages operation src/app/components/document-detail/document-detail.component.ts - 1428 + 1426 An error occurred loading tiff: src/app/components/document-detail/document-detail.component.ts - 1488 + 1486 src/app/components/document-detail/document-detail.component.ts - 1492 + 1490 diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 00e34fe93..130acbd05 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -1286,9 +1286,7 @@ export class DocumentDetailComponent this.document.custom_fields?.forEach((fieldInstance) => { this.customFieldFormFields.push( new FormGroup({ - field: new FormControl( - this.getCustomFieldFromInstance(fieldInstance)?.id - ), + field: new FormControl(fieldInstance.field), value: new FormControl(fieldInstance.value), }), { emitEvent }