Skip to content

Commit dc5da00

Browse files
authored
fix(api): avoid error if project cannot be loaded (#5096)
because of concurrency
1 parent 070f95e commit dc5da00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

engine/api/migrate/clean_duplicate_hooks.go

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ func cleanDuplicateHooks(ctx context.Context, db *gorp.DbMap, store cache.Store,
5050
return sdk.WithStack(err)
5151
}
5252

53+
if projectID == 0 {
54+
return nil
55+
}
56+
5357
proj, err := project.LoadByID(tx, store, projectID,
5458
project.LoadOptions.WithApplicationWithDeploymentStrategies,
5559
project.LoadOptions.WithPipelines,

0 commit comments

Comments
 (0)