Merge and add tag descriptions for the latest image

This commit is contained in:
Joseph Schorr 2013-09-26 18:10:09 -04:00
commit 2e476625de
4 changed files with 44 additions and 11 deletions

View file

@ -85,15 +85,15 @@ def get_repo_api(namespace, repository):
}
def repo_view(repository, tags = []):
tag_list = []
tag_dict = {}
for tag in tags:
tag_list.append(tag_view(tag))
tag_dict[tag.name] = tag_view(tag)
return {
'namespace': repository.namespace,
'name': repository.name,
'description': repository.description,
'tags': tag_list,
'tags': tag_dict,
'can_write': ModifyRepositoryPermission(repository.namespace, repository.name).can()
}