Don't try to get users for tasks if no tasks were found when looking for reminders

This commit is contained in:
kolaente 2021-02-07 14:46:47 +01:00
parent 18b35e1119
commit 9fe46f9a61
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -155,6 +155,10 @@ func RegisterReminderCron() {
return return
} }
if len(taskIDs) == 0 {
return
}
users, err := getTaskUsersForTasks(s, taskIDs) users, err := getTaskUsersForTasks(s, taskIDs)
if err != nil { if err != nil {
log.Errorf("[Task Reminder Cron] Could not get task users to send them reminders: %s", err) log.Errorf("[Task Reminder Cron] Could not get task users to send them reminders: %s", err)