Skip to content

Commit

Permalink
hotfix: 스페이스 단건조회 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondanythings committed Aug 18, 2024
1 parent 726d7d2 commit 3f91b7a
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,8 @@ public List<SpaceWithMemberCount> findAllSpacesByMemberIdAndCategoryAndCursor(Lo
@Override
public Optional<SpaceWithMemberCount> findByIdAndJoinedMemberId(Long spaceId, Long memberId) {

var query = getSpaceWithMemberCountQuery();
var foundSpace = getSpaceWithMemberCountQuery().where(memberSpaceRelation.memberId.eq(memberId).and(space.id.eq(spaceId))).fetchOne();

if (memberId != null) {
query = query.where(memberSpaceRelation.memberId.eq(memberId));
}

SpaceWithMemberCount foundSpace = query
.groupBy(space.id, space.createdAt, space.updatedAt, space.category,
space.fieldList, space.name, space.introduction, member,
space.formId, space.bannerUrl)
.fetchOne();

if (foundSpace == null || isSpaceWithMemberCountEmpty(foundSpace)) {
return Optional.empty();
Expand Down

0 comments on commit 3f91b7a

Please sign in to comment.