Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: prevent SQL syntax error when searching issues without filters (#18064)

boojack47429bfc7f6d
diff --git a/backend/store/issue.go b/backend/store/issue.go
index 74434c1fc7..5837364b73 100644
--- a/backend/store/issue.go
+++ b/backend/store/issue.go
@@ -387,8 +387,10 @@ func (s *Store) ListIssueV2(ctx context.Context, find *FindIssueMessage) ([]*Iss
GROUP BY t.status
) AS t
) AS task_run_status_count ON TRUE
- WHERE ?
- `, from, where)
+ `, from)
+ if where.Len() > 0 {
+ q.Space("WHERE ?", where)
+ }
q.Space(orderByClause)
if v := find.Limit; v != nil {