fix(reminders): overdue tasks join condition
This commit is contained in:
parent
47aae115df
commit
51911a8868
@ -37,9 +37,9 @@ func getUndoneOverdueTasks(s *xorm.Session, now time.Time) (usersWithTasks map[i
|
|||||||
|
|
||||||
var tasks []*Task
|
var tasks []*Task
|
||||||
err = s.
|
err = s.
|
||||||
Where("due_date is not null AND due_date < ? AND lists.is_archived = ? AND namespaces.is_archived = ?", nextMinute.Add(time.Hour*14).Format(dbTimeFormat), false, false).
|
Where("due_date is not null AND due_date < ? AND lists.is_archived = false AND namespaces.is_archived = false", nextMinute.Add(time.Hour*14).Format(dbTimeFormat)).
|
||||||
Join("INNER", "lists", "lists.id = tasks.list_id").
|
Join("LEFT", "lists", "lists.id = tasks.list_id").
|
||||||
Join("INNER", "namespaces", "lists.namespace_id = lists.id").
|
Join("LEFT", "namespaces", "lists.namespace_id = namespaces.id").
|
||||||
And("done = false").
|
And("done = false").
|
||||||
Find(&tasks)
|
Find(&tasks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user