fix recur list

This commit is contained in:
Erik Winter 2025-01-05 09:58:15 +01:00
parent 15b6958248
commit ac4311d542
3 changed files with 2 additions and 2 deletions

BIN
dist/plan vendored

Binary file not shown.

View File

@ -56,7 +56,7 @@ func (la ListArgs) Parse(main []string, fields map[string]string) (Command, erro
fields["from"] = today.String() fields["from"] = today.String()
fields["to"] = today.Add(7).String() fields["to"] = today.Add(7).String()
case main[0] == "recur": case main[0] == "recur":
fields["recurring"] = "true" fields["recurrer"] = "true"
// case main[0] == "list": // case main[0] == "list":
// fields["from"] = today.String() // fields["from"] = today.String()
// fields["to"] = today.String() // fields["to"] = today.String()

View File

@ -71,7 +71,7 @@ func (t *SqliteTask) FindMany(params storage.TaskListParams) ([]item.Task, error
where := make([]string, 0) where := make([]string, 0)
var dateNonEmpty bool var dateNonEmpty bool
if params.HasRecurrer { if params.HasRecurrer {
where[0] = `recurrer != ''` where = append(where, `recurrer != ''`)
} }
if !params.From.IsZero() { if !params.From.IsZero() {
where = append(where, `date >= ?`) where = append(where, `date >= ?`)