Reverting a tag doesn't mean it always has an existing image, so remove that check
This commit is contained in:
parent
fb9c4fecce
commit
55afa2ca08
1 changed files with 4 additions and 8 deletions
|
@ -193,15 +193,11 @@ class PreOCIModel(RegistryDataInterface):
|
|||
manifest_or_legacy_image.docker_image_id)
|
||||
else:
|
||||
if isinstance(manifest_or_legacy_image, Manifest):
|
||||
image = model.tag.restore_tag_to_manifest(repository_ref._db_id, tag_name,
|
||||
manifest_or_legacy_image.digest)
|
||||
if image is None:
|
||||
return None
|
||||
model.tag.restore_tag_to_manifest(repository_ref._db_id, tag_name,
|
||||
manifest_or_legacy_image.digest)
|
||||
else:
|
||||
image = model.tag.restore_tag_to_image(repository_ref._db_id, tag_name,
|
||||
manifest_or_legacy_image.docker_image_id)
|
||||
if image is None:
|
||||
return None
|
||||
model.tag.restore_tag_to_image(repository_ref._db_id, tag_name,
|
||||
manifest_or_legacy_image.docker_image_id)
|
||||
|
||||
return self.get_repo_tag(repository_ref, tag_name, include_legacy_image=True)
|
||||
|
||||
|
|
Reference in a new issue