Skip to content

Commit

Permalink
feat: update summary crons to include curs that have 0 feedback or st…
Browse files Browse the repository at this point in the history
…udentcounts
  • Loading branch information
HRemonen committed Mar 1, 2024
1 parent b3c6836 commit a7c1b34
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/server/services/summary/buildSummaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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 }))

Expand Down

0 comments on commit a7c1b34

Please sign in to comment.