From a9926a38624003284081fd452822c2de727678b5 Mon Sep 17 00:00:00 2001 From: wgwntp <593034713@qq.com> Date: Thu, 1 Aug 2019 16:20:07 +0800 Subject: [PATCH] Clear errors after handle --- exchange.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exchange.go b/exchange.go index 20f06ab..08a9b7c 100644 --- a/exchange.go +++ b/exchange.go @@ -125,8 +125,9 @@ func (res *Resource) Import(container Container, context *qor.Context, callbacks if errors, ok := err.(errorsInterface); ok { for _, err := range errors.GetErrors() { handleError(err) - } + //Avoid repeated handle errors , clear context.Errors + context.Errors = qor.Errors{} } else if errValidations, ok := err.(*validations.Error); ok { for idx, cell := range progress.Cells { if cell.Header == errValidations.Column {