suppress unneeded error message

This commit is contained in:
Paul Fitzpatrick 2023-01-18 12:19:23 -05:00
parent 9d93c2e6c9
commit 2bfd8b42f6

View File

@ -1644,7 +1644,17 @@ export class ActiveDoc extends EventEmitter {
const action: BulkRemoveRecord = ["BulkRemoveRecord", "_grist_Attachments", rowIds];
await this.applyUserActions(makeExceptionalDocSession('system'), [action]);
}
await this.docStorage.removeUnusedAttachments();
try {
await this.docStorage.removeUnusedAttachments();
} catch (e) {
// If document doesn't have _gristsys_Files, don't worry about it;
// if this is an error it will have already been reported, and the
// document can be in this state when updating initial SQL code after
// a schema change.
if (!String(e).match(/no such table: _gristsys_Files/)) {
throw e;
}
}
}
// Needed for test/server/migrations.js tests