Browse Source

feat: restrict attachments bulk update

nc-feat/attachment-clean-up
mertmit 4 months ago
parent
commit
1db651a3a0
  1. 7
      packages/nocodb/src/db/BaseModelSqlv2.ts

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

@ -5590,6 +5590,13 @@ class BaseModelSqlv2 {
if (!args.skipValidationAndHooks) if (!args.skipValidationAndHooks)
await this.validate(updateData, columns); await this.validate(updateData, columns);
// if attachment provided error out
for (const col of columns) {
if (col.uidt === UITypes.Attachment && updateData[col.column_name]) {
NcError.notImplemented(`Attachment bulk update all`);
}
}
await this.prepareNocoData(updateData, false, cookie); await this.prepareNocoData(updateData, false, cookie);
const pkValues = this._extractPksValues(updateData); const pkValues = this._extractPksValues(updateData);

Loading…
Cancel
Save