Skip to content

Commit

Permalink
Make logic more clearly
Browse files Browse the repository at this point in the history
  • Loading branch information
wgwntp committed Aug 2, 2019
1 parent a9926a3 commit e0e7554
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func (res *Resource) Import(container Container, context *qor.Context, callbacks
}
} else {
handleError(context.Errors)
clearContextErrorsForCurrentRow(context)
}
} else {
handleError(err)
Expand All @@ -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)
Expand Down

0 comments on commit e0e7554

Please sign in to comment.