From 6664e63f5273c0794b9b88ed769d3ecccd68ceaf Mon Sep 17 00:00:00 2001 From: Lang Martin Date: Tue, 21 May 2019 18:43:38 -0400 Subject: [PATCH] structs check TaskGroup.Update for nil --- nomad/structs/structs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 965292795df1..fead1a641d34 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -3488,7 +3488,7 @@ func (j *Job) Warnings() error { outer := fmt.Errorf("Group %q has warnings: %v", tg.Name, err) mErr.Errors = append(mErr.Errors, outer) } - if tg.Update.AutoPromote { + if tg.Update != nil && tg.Update.AutoPromote { ap += 1 } }