Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Upstream
Gitea
Commits
a6f5efa0
Commit
a6f5efa0
authored
8 years ago
by
Ethan Koenig
Committed by
Lunny Xiao
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix ambiguity bug in getCommentsByRepoIDSince (#665)
parent
4a1f36c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/issue_comment.go
+4
-2
models/issue_comment.go
with
4 additions
and
2 deletions
+4
-2
models/issue_comment.go
View file @
a6f5efa0
...
...
@@ -420,9 +420,11 @@ func getCommentsByIssueIDSince(e Engine, issueID, since int64) ([]*Comment, erro
func
getCommentsByRepoIDSince
(
e
Engine
,
repoID
,
since
int64
)
([]
*
Comment
,
error
)
{
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
{
sess
.
And
(
"updated_unix >= ?"
,
since
)
sess
.
And
(
"
comment.
updated_unix >= ?"
,
since
)
}
return
comments
,
sess
.
Find
(
&
comments
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment