Skip to content

Commit a3a8594

Browse files
yp05327GiteaBot
andauthored
Fix 500 error when select No assignee filter in issue list page (#24854)
Access the issue list page and select `No assignee`, you will get 500 error: ![image](https://github.com/go-gitea/gitea/assets/18380374/a7435fd3-c3d5-4801-894e-9353a8ddc1af) You can see this page in try.gitea.io: https://try.gitea.io/yp05327/testrepo/issues?q=&type=all&sort=&state=open&labels=&milestone=0&project=0&assignee=-1&poster=0 Caused by https://github.com/go-gitea/gitea/pull/24707/files#diff-d7c7dc2da4fcfdc09997648e11a018414dc116472054350b5590ab407adcd44dR1748 Co-authored-by: Giteabot <teabot@gitea.io>
1 parent bebc343 commit a3a8594

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/issues/issue_stats.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func getIssueStatsChunk(opts *IssuesOptions, issueIDs []int64) (*IssueStats, err
141141
if opts.AssigneeID > 0 {
142142
applyAssigneeCondition(sess, opts.AssigneeID)
143143
} else if opts.AssigneeID == db.NoConditionID {
144-
sess.Where("id NOT IN (SELECT issue_id FROM issue_assignees)")
144+
sess.Where("issue.id NOT IN (SELECT issue_id FROM issue_assignees)")
145145
}
146146

147147
if opts.PosterID > 0 {

0 commit comments

Comments
 (0)