Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/donations: Don't update updatedAt field on iris re-import #599

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

sashko9807
Copy link
Member

@sashko9807 sashko9807 commented Jan 22, 2024

Since campaign donations are ordered by updatedAt field on the front-end, this causes to bank donations to reappear at top every hour.
This is temporary solution until the reason for updating existing donation record is figured out.

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.
Copy link

github-actions bot commented Jan 22, 2024

✅ Tests will run for this PR. Once they succeed it can be merged.

@sashko9807 sashko9807 added the run tests Allows running the tests workflows for forked repos label Jan 22, 2024
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Jan 22, 2024
@@ -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 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my curiosity...
if the donation already exists - why do we even update it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea either thus decided to keep it for now, just in case of specific edge-case I can't think of.

@BogoCvetkov is it safe to remove this update query?

@slavcho slavcho merged commit d21fea3 into podkrepi-bg:master Jan 23, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants