From: Boris Ranto Date: Wed, 6 Dec 2017 16:45:04 +0000 (+0100) Subject: merge.py: Copy over data source if it exists X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dcf8aa39690e823b341305d24605597e039e29c5;p=cephmetrics.git merge.py: Copy over data source if it exists Signed-off-by: Boris Ranto --- diff --git a/tools/merge.py b/tools/merge.py index 29e6699..710c24e 100755 --- a/tools/merge.py +++ b/tools/merge.py @@ -26,7 +26,7 @@ def update(a, b): ra = a['rows'][row_nr] rb = b['rows'][row_nr] for panel_nr in range(len(ra['panels'])): - if 'datasource' in ra['panels'][panel_nr].keys(): + if 'datasource' in rb['panels'][panel_nr].keys(): ra['panels'][panel_nr]['datasource'] = rb['panels'][panel_nr]['datasource'] if 'targets' not in ra['panels'][panel_nr]: continue