Browse Source

fix: accept both array of records and single record (#9319)

nc-chore/remove-signout-admin-page
Pranav C 3 months ago committed by GitHub
parent
commit
48b348ef7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/nocodb/src/db/BaseModelSqlv2.ts

5
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -9799,10 +9799,11 @@ class BaseModelSqlv2 {
}
protected async clearFileReferences(args: {
oldData?: Record<string, any>[];
oldData?: Record<string, any>[] | Record<string, any>;
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));

Loading…
Cancel
Save