From 6840875074fe58793c6697b6b22e154e1502ef8d Mon Sep 17 00:00:00 2001 From: Alexander Petkov Date: Mon, 22 Jan 2024 23:55:06 +0200 Subject: [PATCH] src/donations: Don't update updatedAt field on iris re-import Since campaign donations are ordered by updatedAt field on the front-end, this causes to bank donations to reappear at top every hour. Temporary solution until we figure out, the reason updating of imported donation is needed. --- apps/api/src/donations/donations.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/donations/donations.service.ts b/apps/api/src/donations/donations.service.ts index ab232824..ab0c3d89 100644 --- a/apps/api/src/donations/donations.service.ts +++ b/apps/api/src/donations/donations.service.ts @@ -583,7 +583,7 @@ export class DonationsService { //Donation exists, so updating with incoming donation without increasing vault amounts await this.prisma.donation.update({ where: { extPaymentIntentId: donationDto.extPaymentIntentId }, - data: donationDto, + data: { ...donationDto, updatedAt: existingDonation.updatedAt }, }) return ImportStatus.UPDATED })