From 472297074c9949201aecaf87239d9ef32d44f671 Mon Sep 17 00:00:00 2001 From: Mohammad Ranjbar Z Date: Sun, 24 Dec 2023 16:07:46 +0330 Subject: [PATCH] Move updating views functions out of the loop --- migration/1703398409668-add_missed_op_donations_to_db.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/migration/1703398409668-add_missed_op_donations_to_db.ts b/migration/1703398409668-add_missed_op_donations_to_db.ts index 26a0fc116..c61845778 100644 --- a/migration/1703398409668-add_missed_op_donations_to_db.ts +++ b/migration/1703398409668-add_missed_op_donations_to_db.ts @@ -259,9 +259,10 @@ export class addMissedOpDonationsToDb1703398409668 await updateUserTotalDonated(user.id); await updateUserTotalReceived(project.adminUser?.id); await updateTotalDonationsOfProject(tx.projectId as number); - await refreshProjectEstimatedMatchingView(); - await refreshProjectDonationSummaryView(); } + + await refreshProjectEstimatedMatchingView(); + await refreshProjectDonationSummaryView(); } async down(queryRunner: QueryRunner): Promise {