summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-19 17:30:37 +0100
committerGitHub <noreply@github.com>2020-02-19 17:30:37 +0100
commitaa1bb0b579fa053c3b0c47668dc8be0fa7f987f4 (patch)
treea7ac5b75284a3fa121f26b0d8cfd44f9c90fd2a8
parent5a0b5c564082c7c30dcd49d022f07d051577713e (diff)
parent6e5cf818e9dcd3c58e67fd636cd5cd0a8cbfbf40 (diff)
downloadpodman-aa1bb0b579fa053c3b0c47668dc8be0fa7f987f4.tar.gz
podman-aa1bb0b579fa053c3b0c47668dc8be0fa7f987f4.tar.bz2
podman-aa1bb0b579fa053c3b0c47668dc8be0fa7f987f4.zip
Merge pull request #5259 from schubter/apiv2-create-image
APIv2: Fixed CreateImageFromImage not respecting supplied Tag parameter
-rw-r--r--pkg/api/handlers/generic/images.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/generic/images.go b/pkg/api/handlers/generic/images.go
index afd107207..1ced499d9 100644
--- a/pkg/api/handlers/generic/images.go
+++ b/pkg/api/handlers/generic/images.go
@@ -255,7 +255,7 @@ func CreateImageFromImage(w http.ResponseWriter, r *http.Request) {
tag – Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled.
*/
fromImage := query.FromImage
- if len(query.Tag) < 1 {
+ if len(query.Tag) >= 1 {
fromImage = fmt.Sprintf("%s:%s", fromImage, query.Tag)
}