fix bug with project migration

This commit is contained in:
deityhub
2020-11-05 09:48:43 +01:00
parent 061f07d440
commit d6d10017f2

View File

@@ -3,7 +3,15 @@ const { find, update } = require('../util/db');
const projectCollection = 'projects';
async function run() {
const projects = await find(projectCollection, { deleted: false });
const projects = await find(projectCollection, {
deleted: false,
sendCreatedIncidentNotificationSms: { $exists: false },
sendAcknowledgedIncidentNotificationSms: { $exists: false },
sendResolvedIncidentNotificationSms: { $exists: false },
sendCreatedIncidentNotificationEmail: { $exists: false },
sendAcknowledgedIncidentNotificationEmail: { $exists: false },
sendResolvedIncidentNotificationEmail: { $exists: false },
});
projects.forEach(async project => {
const data = {