Add unit tests and a stronger restriction on the revert API call
This commit is contained in:
parent
e16657ed0e
commit
d1e2d072ea
3 changed files with 55 additions and 8 deletions
|
@ -177,7 +177,7 @@ class RevertTag(RepositoryParamResource):
|
|||
|
||||
# Revert the tag back to the previous image.
|
||||
image_id = request.get_json()['image']
|
||||
model.revert_tag(namespace, repository, tag, image_id)
|
||||
model.revert_tag(tag_image.repository, tag, image_id)
|
||||
model.garbage_collect_repository(namespace, repository)
|
||||
|
||||
# Log the reversion.
|
||||
|
|
Reference in a new issue