Skip to content

Commit

Permalink
fix unreachable branch
Browse files Browse the repository at this point in the history
  • Loading branch information
majewsky committed Nov 12, 2024
1 parent 35af80b commit df7060e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/tasks/account_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ func (j *Janitor) enforceManagedAccount(ctx context.Context, accountName models.
var accountModel *models.Account
accountModel, err = keppel.FindAccount(j.db, accountName)
if err != nil {
return err
}
if errors.Is(err, sql.ErrNoRows) {
nextCheckDuration = 0 // assume the account got already deleted
if errors.Is(err, sql.ErrNoRows) {
nextCheckDuration = 0 // assume the account got already deleted
} else {
return err
}
} else {
actx := keppel.AuditContext{
UserIdentity: janitorUserIdentity{TaskName: "managed-account-enforcement"},
Expand Down

0 comments on commit df7060e

Please sign in to comment.