From f9b31ab4bf0aff0daa30235528129911eb8e4f77 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 24 Jun 2025 22:38:35 +0200 Subject: [PATCH] fix: ambiguous title column in task search (#1012) --- pkg/models/api_tokens.go | 2 +- pkg/models/task_search.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/models/api_tokens.go b/pkg/models/api_tokens.go index 45e9b444b..5e67dce32 100644 --- a/pkg/models/api_tokens.go +++ b/pkg/models/api_tokens.go @@ -137,7 +137,7 @@ func (t *APIToken) ReadAll(s *xorm.Session, a web.Auth, search string, page int, if search != "" { where = builder.And( where, - db.ILIKE("title", search), + db.ILIKE("api_tokens.title", search), ) } diff --git a/pkg/models/task_search.go b/pkg/models/task_search.go index eea5be47d..e9fdb8acb 100644 --- a/pkg/models/task_search.go +++ b/pkg/models/task_search.go @@ -282,7 +282,7 @@ func (d *dbTaskSearcher) Search(opts *taskSearchOptions) (tasks []*Task, totalCo if opts.search != "" { where = builder.Or( - db.ILIKE("title", opts.search), + db.ILIKE("tasks.title", opts.search), db.ILIKE("description", opts.search), )