Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 61f0bab

Browse files
author
Jan-Willem Gmelig Meyling
committed
Filtering inline comments by source attribute rather than source
1 parent ccd335d commit 61f0bab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/nl/tudelft/ewi/devhub/server/database/controllers/CommitComments.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public CommitComments(final EntityManager entityManager) {
3131
@Transactional
3232
public List<CommitComment> getCommentsFor(Group group, String... commitIds) {
3333
return query().from(commitComment)
34-
.where(commitComment.source.isNull()
34+
.where(commitComment.source.sourceFilePath.isNull()
3535
.and(commitComment.commit.repository.eq(group)
3636
.and(commitComment.commit.commitId.in(commitIds))))
3737
.list(commitComment);
@@ -46,7 +46,7 @@ public List<CommitComment> getCommentsFor(Group group, String... commitIds) {
4646
@Transactional
4747
public List<CommitComment> getCommentsFor(Group group, List<String> commitIds) {
4848
return query().from(commitComment)
49-
.where(commitComment.source.isNull()
49+
.where(commitComment.source.sourceFilePath.isNull()
5050
.and(commitComment.commit.repository.eq(group)
5151
.and(commitComment.commit.commitId.in(commitIds))))
5252
.list(commitComment);
@@ -61,7 +61,7 @@ public List<CommitComment> getCommentsFor(Group group, List<String> commitIds) {
6161
@Transactional
6262
public List<CommitComment> getInlineCommentsFor(Group group, Collection<String> commitIds) {
6363
return query().from(commitComment)
64-
.where(commitComment.source.isNotNull()
64+
.where(commitComment.source.sourceFilePath.isNotNull()
6565
.and(commitComment.commit.repository.eq(group)
6666
.and(commitComment.commit.commitId.in(commitIds))))
6767
.list(commitComment);

0 commit comments

Comments
 (0)