Skip to content

Commit

Permalink
Merge pull request #13 from qor/fix-import-handler-error
Browse files Browse the repository at this point in the history
Fix job error report not working
  • Loading branch information
sunfmin authored Aug 1, 2019
2 parents 0f2e7ed + 9883f17 commit 3f8de49
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,19 @@ func (res *Resource) Import(container Container, context *qor.Context, callbacks
if errors, ok := err.(errorsInterface); ok {
for _, err := range errors.GetErrors() {
handleError(err)

}
} else if err, ok := err.(*validations.Error); ok {
} else if errValidations, ok := err.(*validations.Error); ok {
for idx, cell := range progress.Cells {
if cell.Header == err.Column {
cell.Error = err
if cell.Header == errValidations.Column {
cell.Error = errValidations
progress.Cells[idx] = cell
break
}
}
} else if len(progress.Cells) > 0 {
var err error = err
cell := progress.Cells[0]
cell := &progress.Cells[0]
if cell.Error != nil {
var errors qor.Errors
errors.AddError(cell.Error)
Expand Down

0 comments on commit 3f8de49

Please sign in to comment.