From d28fa071edfd81f1a6fd458359b6ddddaf704388 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 1 Feb 2023 14:24:28 +0800 Subject: [PATCH] fix(nc-gui): bypass attachment in saveOrUpdateRecords --- packages/nc-gui/components/smartsheet/Grid.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue index 343da347d3..f16aca60f2 100644 --- a/packages/nc-gui/components/smartsheet/Grid.vue +++ b/packages/nc-gui/components/smartsheet/Grid.vue @@ -558,11 +558,14 @@ const saveOrUpdateRecords = async (args: { metaValue?: TableType; viewMetaValue? currentRow.rowMeta.changed = false continue } + /** if existing row check updated cell and invoke update method */ if (currentRow.rowMeta.changed) { currentRow.rowMeta.changed = false for (const field of (args.metaValue || meta.value)?.columns ?? []) { - if (isVirtualCol(field)) continue + // `url` would be enriched in attachment during listing + // hence it would consider as a change while it is not necessary to update + if (isVirtualCol(field) || field.uidt === UITypes.Attachment) continue if (field.title! in currentRow.row && currentRow.row[field.title!] !== currentRow.oldRow[field.title!]) { await updateOrSaveRow(currentRow, field.title!, {}, args) }