Skip to content

Commit

Permalink
Fix error nil check for existing network provisiond (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVerstraete authored Sep 4, 2020
1 parent 5374091 commit 8ff03f6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/provision/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ func (e *Engine) provision(ctx context.Context, r *Reservation) error {

uniqueID := NetworkID(r.User, nr.Name)
exists, err := e.cache.NetworkExists(string(uniqueID))
if err == nil {
log.Error().Err(err).Msg("failed to check if network exists")
return err
if err != nil {
return errors.Wrap(err, "failed to check if network exists")
}
if exists {
return nil
Expand Down

0 comments on commit 8ff03f6

Please sign in to comment.