diff --git a/data/model/blob.py b/data/model/blob.py index 331241aac..5b8d38420 100644 --- a/data/model/blob.py +++ b/data/model/blob.py @@ -23,7 +23,8 @@ def get_repo_blob_by_digest(namespace, repo_name, blob_digest): raise BlobDoesNotExist('Blob does not exist with digest: {0}'.format(blob_digest)) found = placements[0].storage - found.locations = {placement.location.name for placement in placements} + found.locations = {placement.location.name for placement in placements + if placement.storage.id == found.id} return found