From 87df4e2d5234232ec074e4691960e0e5d490593b Mon Sep 17 00:00:00 2001 From: Alexander Petkov Date: Wed, 1 Nov 2023 15:39:24 +0200 Subject: [PATCH] updateAffiliateBankPayment: Use value of donation's updatedAt field When passing undefined to the query, prisma still updates the updatedAt field, as it uses default property --- 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 9b36fb3a5..716eabf41 100644 --- a/apps/api/src/donations/donations.service.ts +++ b/apps/api/src/donations/donations.service.ts @@ -597,7 +597,7 @@ export class DonationsService { this.vaultService.incrementVaultAmount(donationDto.targetVaultId, donationDto.amount, tx), tx.donation.update({ where: { id: donationDto.id }, - data: { status: DonationStatus.succeeded, updatedAt: undefined }, + data: { status: DonationStatus.succeeded, updatedAt: donationDto.updatedAt }, }), ]) })