diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000..e07d97b Binary files /dev/null and b/dump.rdb differ diff --git a/src/services/donationService.ts b/src/services/donationService.ts index 43e6c6e..c21b8ed 100644 --- a/src/services/donationService.ts +++ b/src/services/donationService.ts @@ -80,17 +80,14 @@ export async function fetchDonationsInfo(): export async function unsetPendingAmountRemainingFromCommittedDonations() { const query = { - status: {$ne: DonationStatus.PENDING}, + status: DonationStatus.COMMITTED, pendingAmountRemaining: {$exists: true} }; const notPendingDonationsWithPendingAmountRemaining = await donationModel.find(query); report.removedPendingAmountRemainingCount = notPendingDonationsWithPendingAmountRemaining.length; console.log('Removed pendingAmountFromDonations count', notPendingDonationsWithPendingAmountRemaining.length) notPendingDonationsWithPendingAmountRemaining.forEach(donation => { - logger.error('Remove pendingAmountFromDonations', { - _id: donation._id, - pendingAmountRemaining: donation.pendingAmountRemaining - }) + logger.error('Remove pendingAmountFromDonations', donation) }) await donationModel.updateMany(query, { $set: {updatedBySimulationDate: new Date()},