diff --git a/endpoints/v2/manifest.py b/endpoints/v2/manifest.py index 8840972d1..9328e02d5 100644 --- a/endpoints/v2/manifest.py +++ b/endpoints/v2/manifest.py @@ -338,7 +338,7 @@ def _updated_v1_metadata(v1_metadata_json, updated_id_map): parsed = json.loads(v1_metadata_json) parsed['id'] = updated_id_map[parsed['id']] - if parsed.get('parent'): + if parsed.get('parent') and parsed['parent'] in updated_id_map: parsed['parent'] = updated_id_map[parsed['parent']] if parsed.get('container_config', {}).get('Image'):