From a7c1b34672b941eea5d5490ad943db4780a4c000 Mon Sep 17 00:00:00 2001 From: Henri Remonen Date: Fri, 1 Mar 2024 12:16:11 +0200 Subject: [PATCH] feat: update summary crons to include curs that have 0 feedback or studentcounts --- src/server/services/summary/buildSummaries.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/server/services/summary/buildSummaries.js b/src/server/services/summary/buildSummaries.js index 00e196833..b7167c850 100644 --- a/src/server/services/summary/buildSummaries.js +++ b/src/server/services/summary/buildSummaries.js @@ -91,10 +91,6 @@ const buildSummariesForPeriod = async ({ // Get all the feedback data and associated entities for this period. Then the rest is done JS side. const feedbackTargets = await FeedbackTarget.findAll({ where: { - // Only consider feedback targets that have feedback. - feedbackCount: { - [Op.gt]: 0, - }, userCreated: false, // Custom feedbacks may cause issues and dont contribute to stats anyways. }, include: [ @@ -414,7 +410,7 @@ const buildSummariesForPeriod = async ({ .concat(courseUnitGroupSummaries) .concat(tagSummaries) .concat(orgSummariesWithVariants) - .filter(summary => summary.data && summary.data.feedbackCount > 0) + .filter(summary => summary.data) .map(summary => _.pick(summary, relevantFields)) .map(summary => ({ ...summary, startDate, endDate }))