Skip to content

Commit 93f136f

Browse files
committed
fix: migration script
1 parent 961d535 commit 93f136f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

migrations/2021-06-14-recreate-and-repopulate-work-periods-for-resource-bookings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const ResourceBooking = require('../src/models').ResourceBooking
33
const _ = require('lodash')
44
const helper = require('../src/common/helper')
55
const { v4: uuid } = require('uuid')
6-
const { PaymentStatus } = require('../app-constants')
6+
const { AggregatePaymentStatus } = require('../app-constants')
77

88
// maximum start date of resource bookings when populating work periods from existing resource bookings in migration script
99
const MAX_START_DATE = process.env.MAX_START_DATE || '2100-12-31'
@@ -85,7 +85,7 @@ module.exports = {
8585
days_worked: period.daysWorked,
8686
days_paid: 0,
8787
payment_total: 0,
88-
payment_status: period.daysWorked === 0 ? PaymentStatus.NO_DAYS : PaymentStatus.PENDING,
88+
payment_status: period.daysWorked === 0 ? AggregatePaymentStatus.NO_DAYS : AggregatePaymentStatus.PENDING,
8989
created_by: config.m2m.M2M_AUDIT_USER_ID,
9090
created_at: new Date()
9191
})

0 commit comments

Comments
 (0)