From 0ffa736143a8b0e10fd5af5fe47ab4ce3233dc46 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 25 Feb 2022 12:27:52 +0200 Subject: [PATCH] Fixed dbv1 migration to match applied data patches --- app/imports/migrations/server/dbv1/dbv1.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/imports/migrations/server/dbv1/dbv1.js b/app/imports/migrations/server/dbv1/dbv1.js index 9e140ef3..d299fc58 100644 --- a/app/imports/migrations/server/dbv1/dbv1.js +++ b/app/imports/migrations/server/dbv1/dbv1.js @@ -217,7 +217,9 @@ function getInlineComputationTransforms(key){ function calculationUp(val){ if (typeof val !== 'string') return val; - return val.replace('.value', '.total').replace('.currentValue', '.value'); + return val.replace(/#(\w+).(\w+)Result/g, '#$1.$2') + .replace('.value', '.total') + .replace('.currentValue', '.value'); } function calculationDown(val){