summaryrefslogtreecommitdiffstats
path: root/src/main/docker/kibana/restore.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/docker/kibana/restore.py')
-rwxr-xr-xsrc/main/docker/kibana/restore.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/docker/kibana/restore.py b/src/main/docker/kibana/restore.py
index f58701bba..70f430c57 100755
--- a/src/main/docker/kibana/restore.py
+++ b/src/main/docker/kibana/restore.py
@@ -90,7 +90,10 @@ def main():
obj_id = obj['id']
for key in ('id', 'version', 'type', 'updated_at'):
- del obj[key]
+ try:
+ del obj[key]
+ except KeyError:
+ logger.info("Could not find key %s in %s[%s]", key, obj_type, obj_id)
logger.info('Restoring %s id:%s (overwrite:%s)', obj_type, obj_id, args.force)
url = "%s/api/saved_objects/%s/%s" % (args.kibana_host.rstrip("/"), obj_type, obj_id)