From fb3011e036b2fd861b0a2d871ac71cb4b62686c0 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 22 Jul 2022 14:52:01 +0000 Subject: [PATCH] Handle missing assignee --- rules/rules.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rules/rules.go b/rules/rules.go index 37c716d..e260ee1 100644 --- a/rules/rules.go +++ b/rules/rules.go @@ -86,6 +86,10 @@ func (p *periodic) InMyTasksSections(names ...string) *periodic { // Backup filter if the API misbehaves // Asana issue #600801 p.taskFilters = append(p.taskFilters, func(wc *client.WorkspaceClient, q *client.SearchQuery, t *client.Task) (bool, error) { + if t.AssigneeSection == nil { + return false, fmt.Errorf("missing assignee: %s", t) + } + for _, sec := range q.SectionsAny { if sec.GID == t.AssigneeSection.GID { return true, nil