Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: preferTrip null가능하게 수정 #123

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ public void addTeam(AddTeamReqDto addTeamReqDto) {
public DetailTeamResDto detailTeam(DetailTeamReqDto detailTeamReqDto) {
Team team = teamRepository.findById(detailTeamReqDto.getTeamIdx()).orElseThrow(() -> new ApiException(ExceptionEnum.TEAM_NOT_FOUND));
TeamMember teamMember = teamMemberRepository.findById(detailTeamReqDto.getTeamMemberIdx()).orElseThrow(() -> new ApiException(ExceptionEnum.TEAM_MEMBER_NOT_FOUND));
Long preferTripIdx = null;
if(team.getPreferTrip()!=null) preferTripIdx = team.getPreferTrip().getTripIdx();

return DetailTeamResDto.builder()
.preferTripIdx(team.getPreferTrip().getTripIdx())
.preferTripIdx(preferTripIdx)
.teamNotice(team.getTeamNotice())
.teamName(team.getTeamName())
.accNumber(team.getAccount().getAccNumber())
Expand Down
Loading