Make sure images in the process of being uploaded are not scanned by Clair

This commit is contained in:
Joseph Schorr 2019-02-08 16:20:44 -05:00
parent 8d722dee81
commit 0b706bc7c4
3 changed files with 11 additions and 1 deletions

View file

@ -145,6 +145,7 @@ class _ManifestBuilder(object):
def assign_layer_blob(self, layer, blob, computed_checksums):
""" Assigns a blob to a layer. """
assert blob
assert not blob.uploading
repo_image = model.image.get_image_by_db_id(layer.db_id)
if repo_image is None: