Skip to content

Commit e42b918

Browse files
committed
[YS-311] fix: 성별 무관한 공고에 대해서 남/녀로 필터링했을 때 보이지 않는 현상 해결 (#98)
1 parent 6e1cf8e commit e42b918

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/com/dobby/backend/infrastructure/database/repository/ExperimentPostCustomRepositoryImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ class ExperimentPostCustomRepositoryImpl (
104104
}
105105

106106
private fun genderEq(post: QExperimentPostEntity, gender: GenderType?): BooleanExpression? {
107-
return gender?.let { post.targetGroup.genderType.eq(it) }
107+
return gender?.let {
108+
post.targetGroup.genderType.eq(it).or(post.targetGroup.genderType.eq(GenderType.ALL)) }
108109
}
109110

110111
private fun ageBetween(post: QExperimentPostEntity, age: Int?): BooleanExpression? {

0 commit comments

Comments
 (0)