Skip to content

Commit e95e5c2

Browse files
committed
[upgrade] do not upgrade already upgraded widgets
1 parent 346a928 commit e95e5c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/upgrade/22.02/scripts/update_widgets_reports.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,13 @@ pluginManager.dbConnection().then((countlyDb) => {
281281
}
282282
function upgrade(widget, done) {
283283
console.log("Upgrading widgets", widget._id, widget.type);
284-
if (widget.drill_report && widget.drill_report.length) {
284+
if (widget.drill_report && widget.drill_report.length && !widget.drill_query) {
285285
console.log("This is a drill widget");
286286
asyncjs.eachSeries(widget.drill_report, function(report_id, callback){
287287
upgradeDrillReport(widget, report_id, countlyDb, countlyDrill, callback);
288288
}, done);
289289
}
290-
else if (widget.cmetrics && widget.cmetrics.length) {
290+
else if (widget.cmetrics && widget.cmetrics.length && !widget.cmetric_refs) {
291291
console.log("This is a formula widget");
292292
asyncjs.eachSeries(widget.cmetrics, function(report_id, callback){
293293
upgradeFormulaReport(widget, report_id, countlyDb, countlyDrill, callback);

0 commit comments

Comments
 (0)