Skip to content

Commit

Permalink
add comment about confusing if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Jul 18, 2024
1 parent ab0ecb1 commit aa48783
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/controller/dal/dal.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ func (d *DAL) ReplaceDeployment(ctx context.Context, newDeploymentKey model.Depl
}
replacedDeploymentKey = optional.Some(oldDeployment.Key)
} else if !dalerrs.IsNotFound(err) {
// any error other than not found
return fmt.Errorf("replace deployment failed to get existing deployment for %v: %w", newDeploymentKey, dalerrs.TranslatePGError(err))
} else {
// Set the desired replicas for the new deployment
Expand Down

0 comments on commit aa48783

Please sign in to comment.