mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 11:01:32 +00:00 
			
		
		
		
	Fix ambiguity bug in getCommentsByRepoIDSince (#665)
This commit is contained in:
		@@ -420,9 +420,11 @@ func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, erro
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
 | 
					func getCommentsByRepoIDSince(e Engine, repoID, since int64) ([]*Comment, error) {
 | 
				
			||||||
	comments := make([]*Comment, 0, 10)
 | 
						comments := make([]*Comment, 0, 10)
 | 
				
			||||||
	sess := e.Where("issue.repo_id = ?", repoID).Join("INNER", "issue", "issue.id = comment.issue_id", repoID).Asc("created_unix")
 | 
						sess := e.Where("issue.repo_id = ?", repoID).
 | 
				
			||||||
 | 
							Join("INNER", "issue", "issue.id = comment.issue_id").
 | 
				
			||||||
 | 
							Asc("comment.created_unix")
 | 
				
			||||||
	if since > 0 {
 | 
						if since > 0 {
 | 
				
			||||||
		sess.And("updated_unix >= ?", since)
 | 
							sess.And("comment.updated_unix >= ?", since)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return comments, sess.Find(&comments)
 | 
						return comments, sess.Find(&comments)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user