Skip to content

Commit

Permalink
fix: solve IncorrectResultSizeDataAccessException
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeunda committed Jun 26, 2024
1 parent 5d1c612 commit a82df4b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public UserDetailDto readUser(Long userId) {
String title = (latestAchievement != null) ? latestAchievement.getTitle() : null;

// ์œ ์ € ํŒ€ ์ •๋ณด ์กฐํšŒ
Optional<UserTeam> userTeamOptional = userTeamRepository.findByUserId(userId);
Optional<UserTeam> userTeamOptional = userTeamRepository.findFirstByUserIdOrderByIdDesc(userId);
Boolean isInTeam = userTeamOptional.isPresent() && userTeamOptional.get().getTeam() != null;
Long teamId = isInTeam ? userTeamOptional.get().getTeam().getId() : null;

Expand Down

0 comments on commit a82df4b

Please sign in to comment.