Skip to content

Commit

Permalink
Add nil check for flux script on UpdateTask
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeMac committed Jul 26, 2019
1 parent f43fc92 commit 5079b6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions authorizer/task.go
Expand Up @@ -155,8 +155,11 @@ func (ts *taskServiceValidator) UpdateTask(ctx context.Context, id platform.ID,
return nil, err
}

if err := ts.validateBucket(ctx, *upd.Flux, task.OrganizationID, loggerFields...); err != nil {
return nil, err
// given an update to the task flux definition
if upd.Flux != nil {
if err := ts.validateBucket(ctx, *upd.Flux, task.OrganizationID, loggerFields...); err != nil {
return nil, err
}
}

return ts.TaskService.UpdateTask(ctx, id, upd)
Expand Down

0 comments on commit 5079b6e

Please sign in to comment.