Skip to content

Commit

Permalink
fix(engine): app is already define above (#5880)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux authored Jul 7, 2021
1 parent 84d1886 commit f9144aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/api/purge/purge_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ func ApplyRetentionPolicyOnWorkflow(ctx context.Context, store cache.Store, db *
if wf.WorkflowData.Node.Context != nil {
appID := wf.WorkflowData.Node.Context.ApplicationID
if appID != 0 {
app, err := application.LoadByID(db, appID)
appDB, err := application.LoadByID(db, appID)
if err != nil {
return err
}
app = *appDB
if app.RepositoryFullname != "" {
tx, err := db.Begin()
if err != nil {
Expand Down

0 comments on commit f9144aa

Please sign in to comment.