diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 74ba7957c..4f484c3f2 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -465,15 +465,15 @@ func CloudBrainImageEdit(ctx *context.Context) { if err != nil { log.Error("GetImageByID failed:%v", err.Error()) ctx.NotFound(ctx.Req.URL.RequestURI(), nil) - - image, err := models.GetImageByID(id) - if err != nil { - log.Error("GetImageByID failed:%v", err.Error()) - ctx.NotFound(ctx.Req.URL.RequestURI(), nil) - } - ctx.Data["Image"] = image - ctx.HTML(http.StatusOK, tplCloudBrainImageEdit) } + image, err := models.GetImageByID(id) + if err != nil { + log.Error("GetImageByID failed:%v", err.Error()) + ctx.NotFound(ctx.Req.URL.RequestURI(), nil) + } + ctx.Data["Image"] = image + ctx.HTML(http.StatusOK, tplCloudBrainImageEdit) + } func CloudBrainImageEditPost(ctx *context.Context, form auth.EditImageCloudBrainForm) { @@ -815,7 +815,7 @@ func CloudBrainShowModels(ctx *context.Context) { func GetPublicImages(ctx *context.Context) { opts := models.SearchImageOptions{ - IncludePrivateOnly: true, + IncludePublicOnly: true, UID: -1, Keyword: ctx.Query("q"), Topics: ctx.Query("topic"),