Skip to content

Commit

Permalink
Changed notNull to is null bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianFun123 committed Mar 10, 2024
1 parent bcf128f commit 7c419ee
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ public List<Folder> getFolders() {
}

public List<FolderResponse> getFolderTree(boolean fetchChildren, boolean fetchSubChildren, boolean fetchPastes) {
return Repo.get(Folder.class).where("userId", id).whereNotNull("parent").all().stream().map(folder -> new FolderResponse(folder, fetchChildren, fetchSubChildren, fetchPastes, true)).collect(Collectors.toList());
return Repo.get(Folder.class)
.where("userId", id)
.whereNull("parent")
.all()
.stream()
.map(folder -> new FolderResponse(folder, fetchChildren, fetchSubChildren, fetchPastes, true))
.collect(Collectors.toList());
}

public List<FolderResponse> getFolderWithChildren() {
Expand Down

0 comments on commit 7c419ee

Please sign in to comment.