From d9d96c4c6d0b984a7558a78ec8c0e703baa5f083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=20Keskim=C3=A4ki?= Date: Fri, 20 Oct 2023 14:51:16 +0300 Subject: [PATCH] Don't delete user created ufbts weekly --- src/updater/updateStudentFeedbackTargets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/updater/updateStudentFeedbackTargets.js b/src/updater/updateStudentFeedbackTargets.js index 658cfc8..b10d78c 100644 --- a/src/updater/updateStudentFeedbackTargets.js +++ b/src/updater/updateStudentFeedbackTargets.js @@ -98,7 +98,8 @@ const updateStudentFeedbackTargets = async () => { await sequelize.query( `DELETE FROM user_feedback_targets WHERE feedback_id IS NULL AND access_status = 'STUDENT' - AND feedback_open_email_sent = false`, + AND feedback_open_email_sent = false + AND user_created = false`, ) }