Correlate a specific blob storage with its placements
This commit is contained in:
parent
ab340e20ea
commit
cf1ec68046
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
raise BlobDoesNotExist('Blob does not exist with digest: {0}'.format(blob_digest))
|
||||||
|
|
||||||
found = placements[0].storage
|
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
|
return found
|
||||||
|
|
||||||
|
|
Reference in a new issue