From e98079179625e44b324aaf9c5d3d112b45aac1a4 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 19 Feb 2021 22:33:47 +0800 Subject: [PATCH] fix: skip non-existent collection --- packages/plugin-automations/src/models/automation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-automations/src/models/automation.ts b/packages/plugin-automations/src/models/automation.ts index 72d3e80031..ac74d56577 100644 --- a/packages/plugin-automations/src/models/automation.ts +++ b/packages/plugin-automations/src/models/automation.ts @@ -82,7 +82,7 @@ export class AutomationModel extends Model { const changedFields = (this.get('changed') as any) || []; const M = this.database.getModel(collectionName); const automationType = this.get('type'); - if (automationType !== 'schedule' || !collectionName || !M) { + if (automationType !== 'schedule' && (!collectionName || !M)) { return; } switch (automationType) {