From 1eb48a7b40df4a957fabebc8fa9259ae3a13d7b6 Mon Sep 17 00:00:00 2001 From: "Mr. Lan" Date: Fri, 31 Jul 2020 23:51:00 +0800 Subject: [PATCH] fix bug. --- pkg/service/handle.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkg/service/handle.go b/pkg/service/handle.go index 0e3907d..b6fccbf 100644 --- a/pkg/service/handle.go +++ b/pkg/service/handle.go @@ -547,11 +547,21 @@ func (h *Handle) HandleWorkOrder( } if parallelStatusOk { h.endHistory = true + endAssignValue, ok := h.targetStateValue["assignValue"] + if !ok { + endAssignValue = []int{} + } + + endAssignType, ok := h.targetStateValue["assignType"] + if !ok { + endAssignType = "" + } + h.updateValue["state"] = []map[string]interface{}{{ "id": h.targetStateValue["id"].(string), "label": h.targetStateValue["label"], - "processor": h.targetStateValue["assignValue"], - "process_method": h.targetStateValue["assignType"], + "processor": endAssignValue, + "process_method": endAssignType, }} err = h.circulation() if err != nil {