From cf1ec68046db55d29b37056462534dbac652755a Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 12 Nov 2015 16:20:59 -0500 Subject: [PATCH] Correlate a specific blob storage with its placements --- data/model/blob.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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