diff --git a/models/issues/issue_stats.go b/models/issues/issue_stats.go index 9b9562ebd..d86123a82 100644 --- a/models/issues/issue_stats.go +++ b/models/issues/issue_stats.go @@ -141,7 +141,7 @@ func getIssueStatsChunk(opts *IssuesOptions, issueIDs []int64) (*IssueStats, err if opts.AssigneeID > 0 { applyAssigneeCondition(sess, opts.AssigneeID) } else if opts.AssigneeID == db.NoConditionID { - sess.Where("id NOT IN (SELECT issue_id FROM issue_assignees)") + sess.Where("issue.id NOT IN (SELECT issue_id FROM issue_assignees)") } if opts.PosterID > 0 {