cloudapi: check if metadata is nil before converting
This commit is contained in:
parent
51503cc000
commit
cfb244ab34
1 changed files with 1 additions and 1 deletions
|
|
@ -609,7 +609,7 @@ func (server *Server) ComposeMetadata(w http.ResponseWriter, r *http.Request, id
|
|||
resp := new(ComposeMetadata)
|
||||
resp.Packages = &packages
|
||||
|
||||
if ostreeCommitResult != nil {
|
||||
if ostreeCommitResult != nil && ostreeCommitResult.Metadata != nil {
|
||||
commitMetadata, ok := ostreeCommitResult.Metadata.(*osbuild1.OSTreeCommitStageMetadata)
|
||||
if !ok {
|
||||
panic("Failed to convert ostree commit stage metadata")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue