cloudapi: check upload targets in request validation
It is now valid for UploadOptions to be nil but only if there is at least one UploadTarget defined.
This commit is contained in:
parent
5c95eb565c
commit
9fc4551fdf
1 changed files with 1 additions and 1 deletions
|
|
@ -237,7 +237,7 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
}
|
||||
|
||||
var irTargets []*target.Target
|
||||
if ir.UploadOptions == nil {
|
||||
if ir.UploadOptions == nil && (ir.UploadTargets == nil || len(*ir.UploadTargets) == 0) {
|
||||
// nowhere to put the image, this is a user error
|
||||
if request.Koji == nil {
|
||||
return HTTPError(ErrorJSONUnMarshallingError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue