Skip to content

Commit

Permalink
fix(api): avoid error if project cannot be loaded (#5096)
Browse files Browse the repository at this point in the history
because of concurrency
  • Loading branch information
fsamin committed Apr 2, 2020
1 parent 070f95e commit dc5da00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/api/migrate/clean_duplicate_hooks.go
Expand Up @@ -50,6 +50,10 @@ func cleanDuplicateHooks(ctx context.Context, db *gorp.DbMap, store cache.Store,
return sdk.WithStack(err)
}

if projectID == 0 {
return nil
}

proj, err := project.LoadByID(tx, store, projectID,
project.LoadOptions.WithApplicationWithDeploymentStrategies,
project.LoadOptions.WithPipelines,
Expand Down

0 comments on commit dc5da00

Please sign in to comment.