diff --git a/exchange.go b/exchange.go index 08a9b7c..53e8571 100644 --- a/exchange.go +++ b/exchange.go @@ -161,6 +161,7 @@ func (res *Resource) Import(container Container, context *qor.Context, callbacks } } else { handleError(context.Errors) + clearContextErrorsForCurrentRow(context) } } else { handleError(err) @@ -179,6 +180,9 @@ func (res *Resource) Import(container Container, context *qor.Context, callbacks } return err } +func clearContextErrorsForCurrentRow(context *qor.Context) { + context.Errors = qor.Errors{} +} // Export used export data from a exchange Resource // product.Export(csv.New("products.csv"), context)