mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 23:28:20 +01:00
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:
commit
f631d67020
@ -133,6 +133,12 @@ func (ra *RepositoryAPI) Delete() {
|
||||
log.Errorf("error occurred while listing tags of %s: %v", repoName, err)
|
||||
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...)
|
||||
} else {
|
||||
tags = append(tags, tag)
|
||||
|
Loading…
Reference in New Issue
Block a user