diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index 0c5cb3ef53..5761abc8ce 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -9799,10 +9799,11 @@ class BaseModelSqlv2 { } protected async clearFileReferences(args: { - oldData?: Record[]; + oldData?: Record[] | Record; columns?: Column[]; }) { - const { oldData, columns } = args; + const { oldData: _oldData, columns } = args; + const oldData = Array.isArray(_oldData) ? _oldData : [_oldData]; const modelColumns = columns || (await this.model.getColumns(this.context));