Skip to content

Commit

Permalink
Check CaseID has a value
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Hendry committed Jun 17, 2018
1 parent f926b73 commit 3eeddee
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,14 @@ func (h handler) processInvite(invites []invite) (result error) {
continue
}

// Step 4
err = h.runsql("2_add_invitation_sent_message_to_a_case_v3.0.sql", invite)
if err != nil {
ctx.WithError(err).Error("failed to run 2_add_invitation_sent_message_to_a_case_v3.0.sql")
result = multierror.Append(result, multierror.Prefix(err, invite.ID))
continue
if invite.CaseID != 0 {
// Step 4
err = h.runsql("2_add_invitation_sent_message_to_a_case_v3.0.sql", invite)
if err != nil {
ctx.WithError(err).Error("failed to run 2_add_invitation_sent_message_to_a_case_v3.0.sql")
result = multierror.Append(result, multierror.Prefix(err, invite.ID))
continue
}
}
}

Expand Down

0 comments on commit 3eeddee

Please sign in to comment.