Fix bug in V1 delete tag code and add a test
This commit is contained in:
parent
077c3908e4
commit
7567808a10
3 changed files with 26 additions and 7 deletions
|
@ -98,6 +98,9 @@ def delete_tag(namespace_name, repo_name, tag):
|
|||
|
||||
if permission.can():
|
||||
repo = model.get_repository(namespace_name, repo_name)
|
||||
if repo is None:
|
||||
abort(403)
|
||||
|
||||
if repo.kind != 'image':
|
||||
msg = 'This repository is for managing %s resources and not container images.' % repo.kind
|
||||
abort(405, message=msg, namespace=namespace_name)
|
||||
|
|
Reference in a new issue