1
0
Fork 0
mirror of synced 2024-06-18 21:31:08 -04:00

Fix issue when new keys are available in datasource (#21)

Fix issue when new keys are available in datasource
This commit is contained in:
thouveng 2016-12-12 16:53:38 +01:00 committed by Éric Lemoine
parent ceb52864dc
commit b388042cd6

View file

@ -254,7 +254,9 @@ def _diff(old, new):
for key in old_keys:
if key == 'id' or key == 'orgId':
del old[key]
elif old[key] == new[key]:
# New versions of Grafana can introduce new keys that are not present
# in _get_json_data.
elif key in new and old[key] == new[key]:
del old[key]
del new[key]
return {'old': old, 'new': new}