diff options
Diffstat (limited to 'src/main/docker/kibana/restore.py')
-rwxr-xr-x | src/main/docker/kibana/restore.py | 5 |
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) |