Skip to content

Commit c122bdc

Browse files
committed
fix :: nullable로 변경
1 parent 375dedd commit c122bdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/JavaProject/Dayoung/domain/quiz/repository/QuizRepositoryImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ public List<Quiz> queryAllForMostSolved() {
7777
}
7878

7979
private BooleanExpression containsTitle(String title) {
80-
return title == null ? null : quiz.title.contains(title);
80+
return title == null || title.isEmpty() ? null : quiz.title.contains(title);
8181
}
8282

8383
private BooleanExpression containsArea(List<Area> areas) {
8484
//return areas == null ? null : quiz.area.in(areas);
85-
return areas == null ? null : quiz.area.contains((Area) areas);
85+
return areas == null || areas.isEmpty() ? null : quiz.area.contains((Area) areas);
8686
}
8787

8888
private BooleanExpression containsLevel(List<Level> levels) {

0 commit comments

Comments
 (0)