diff --git a/packages/plugin-automations/src/models/automation.ts b/packages/plugin-automations/src/models/automation.ts index 72d3e8003..ac74d5657 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) {