From c7f8bbfbcbbeee945ae84c637ab9554ee5636b50 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 12 Sep 2023 17:49:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=90=88=E5=9B=BE,=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/image_handle.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index b05e1360..753fdc82 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -264,7 +264,17 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq logx.Error(err) return nil, err } + if templateInfo["materialList"] == nil { + err = errors.New("materialList is null") + logc.Errorf(ctx, "materialList err:%v", err) + return nil, err + } materialList = templateInfo["materialList"].([]interface{}) + if templateInfo["groupOptions"] == nil { + err = errors.New("groupOptions is null") + logc.Errorf(ctx, "groupOptions err:%v", err) + return nil, err + } groupOptions = templateInfo["groupOptions"].(map[string]interface{}) }