Change to a list comprehesion
This commit is contained in:
parent
971dd7dd3a
commit
bd2fe5cf99
1 changed files with 1 additions and 4 deletions
|
@ -769,10 +769,7 @@ def delete_tag_and_images(namespace_name, repository_name, tag_name):
|
||||||
tag_image_ids.discard(str(tag.image.id))
|
tag_image_ids.discard(str(tag.image.id))
|
||||||
|
|
||||||
# Find all the images that belong to the tag.
|
# Find all the images that belong to the tag.
|
||||||
tag_images = []
|
tag_images = [image for image in all_images if str(image.id) in tag_image_ids]
|
||||||
for image in all_images:
|
|
||||||
if str(image.id) in tag_image_ids:
|
|
||||||
tag_images.append(image)
|
|
||||||
|
|
||||||
# Delete the tag found.
|
# Delete the tag found.
|
||||||
found_tag.delete_instance()
|
found_tag.delete_instance()
|
||||||
|
|
Reference in a new issue