From 9fe46f9a611f911478224f515784731e0317a7d5 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 7 Feb 2021 14:46:47 +0100 Subject: [PATCH] Don't try to get users for tasks if no tasks were found when looking for reminders --- pkg/models/task_reminder.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/models/task_reminder.go b/pkg/models/task_reminder.go index b421558b..78979721 100644 --- a/pkg/models/task_reminder.go +++ b/pkg/models/task_reminder.go @@ -155,6 +155,10 @@ func RegisterReminderCron() { return } + if len(taskIDs) == 0 { + return + } + users, err := getTaskUsersForTasks(s, taskIDs) if err != nil { log.Errorf("[Task Reminder Cron] Could not get task users to send them reminders: %s", err)