Merge pull request #338 from ywk253100/sync_image

bug fix: deletion of repository which has been deleted should return 404
This commit is contained in:
Wenkai Yin 2016-06-14 18:34:10 +08:00 committed by GitHub
commit f631d67020

View File

@ -133,6 +133,12 @@ func (ra *RepositoryAPI) Delete() {
log.Errorf("error occurred while listing tags of %s: %v", repoName, err) log.Errorf("error occurred while listing tags of %s: %v", repoName, err)
ra.CustomAbort(http.StatusInternalServerError, "internal error") ra.CustomAbort(http.StatusInternalServerError, "internal error")
} }
// TODO remove the logic if the bug of registry is fixed
if len(tagList) == 0 {
ra.CustomAbort(http.StatusNotFound, http.StatusText(http.StatusNotFound))
}
tags = append(tags, tagList...) tags = append(tags, tagList...)
} else { } else {
tags = append(tags, tag) tags = append(tags, tag)