fix(tasks): explicitly add task position to select statement when looking up tasks with Typesense
Resolves https://kolaente.dev/vikunja/vikunja/issues/2546 Resolves https://community.vikunja.io/t/version-0-24-0-internal-server-error-breaking-change/2558/5
This commit is contained in:
parent
02a7958865
commit
2c6bc7742f
@ -604,8 +604,13 @@ func (t *typesenseTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task,
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
var distinct = "tasks.*"
|
||||
if strings.Contains(orderby, "task_positions.") {
|
||||
distinct += ", task_positions.position"
|
||||
}
|
||||
|
||||
query := t.s.
|
||||
Distinct("tasks.*").
|
||||
Distinct(distinct).
|
||||
In("id", taskIDs).
|
||||
OrderBy(orderby)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user