Skip to content

Commit

Permalink
Only use ACTIVE documents in palaute enrolments
Browse files Browse the repository at this point in the history
  • Loading branch information
Veikkosuhonen committed Mar 4, 2024
1 parent 7fe3510 commit 6c742e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions importer-db-api/src/routes/palaute/palaute.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ updaterRouter.get('/enrolments', async (req, res) => {
since = defaultSince
}

const enrolments = await models.Enrolment.unscoped().findAll({
const enrolments = await models.Enrolment.findAll({
where: {
enrolmentDateTime: {
[Op.gte]: since,
Expand All @@ -188,7 +188,7 @@ updaterRouter.get('/deleted-enrolments', async (req, res) => {
since = defaultSince
}

const enrolments = await models.Enrolment.unscoped().findAll({
const enrolments = await models.Enrolment.findAll({
where: {
enrolmentDateTime: {
[Op.gte]: since,
Expand Down

0 comments on commit 6c742e6

Please sign in to comment.