Correlate a specific blob storage with its placements

This commit is contained in:
Jake Moshenko 2015-11-12 16:20:59 -05:00
parent ab340e20ea
commit cf1ec68046

View file

@ -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