Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
aa6468d27f
1 changed files with 3 additions and 0 deletions
|
@ -287,6 +287,9 @@ def get_parent_images(image_obj):
|
|||
parents = image_obj.ancestors
|
||||
parent_db_ids = parents.strip('/').split('/')
|
||||
|
||||
if parent_db_ids == ['']:
|
||||
return []
|
||||
|
||||
or_clauses = [(Image.id == db_id) for db_id in parent_db_ids]
|
||||
parent_images = Image.select().where(reduce(operator.or_, or_clauses))
|
||||
id_to_image = {unicode(image.id): image for image in parent_images}
|
||||
|
|
Reference in a new issue