diff --git a/data/model/blob.py b/data/model/blob.py index 329daf7a2..b4db5afe6 100644 --- a/data/model/blob.py +++ b/data/model/blob.py @@ -11,14 +11,14 @@ def get_repo_blob_by_digest(namespace, repo_name, blob_digest): """ try: storage_id_query = (ImageStorage - .select(ImageStorage.id) - .join(Image) - .join(Repository) - .join(Namespace, on=(Namespace.id == Repository.namespace_user)) - .where(Repository.name == repo_name, Namespace.username == namespace, - ImageStorage.content_checksum == blob_digest, - ImageStorage.uploading == False) - .limit(1)) + .select(ImageStorage.id) + .join(Image) + .join(Repository) + .join(Namespace, on=(Namespace.id == Repository.namespace_user)) + .where(Repository.name == repo_name, Namespace.username == namespace, + ImageStorage.content_checksum == blob_digest, + ImageStorage.uploading == False) + .limit(1)) return storage_model.get_storage_by_subquery(storage_id_query) except InvalidImageException: