fix recur list
This commit is contained in:
parent
15b6958248
commit
ac4311d542
|
@ -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()
|
||||||
|
|
|
@ -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 >= ?`)
|
||||||
|
|
Loading…
Reference in New Issue