Check error state on update sql
This commit is contained in:
parent
6338d9f3f3
commit
544f99c09b
1 changed files with 4 additions and 1 deletions
|
|
@ -95,10 +95,13 @@ func UploadCommit(ctx context.Context, org Organization, file_id int32, committe
|
|||
um.Where(psql.Quote("id").EQ(psql.Arg(file_id))),
|
||||
um.Where(psql.Quote("organization_id").EQ(psql.Arg(org.ID))),
|
||||
).Exec(ctx, txn)
|
||||
err = background.NewCSVCommit(ctx, txn, file_id)
|
||||
if err != nil {
|
||||
return fmt.Errorf("update upload: %w", err)
|
||||
}
|
||||
err = background.NewCSVCommit(ctx, txn, file_id)
|
||||
if err != nil {
|
||||
return fmt.Errorf("background csv commit: %w", err)
|
||||
}
|
||||
err = txn.Commit(ctx)
|
||||
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue