Skip to content

Commit

Permalink
Fix: if userVo is null, random
Browse files Browse the repository at this point in the history
  • Loading branch information
emost22 committed Jul 20, 2024
1 parent aa66f32 commit a334e49
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public Result execute(Dto input) {
}

final UserVo userVo = userProvider.getUserInfo(input.getUserId());
JobGroup jobGroup = userVo.getJobGroup();
JobGroup jobGroup = null;
if (userVo != null) {
jobGroup = userVo.getJobGroup();
}

return RandomQuestionBusinessMapper.INSTANCE.toResult(
questionProvider.randomQuestion(
jobGroup, input.getUserId(), input.getCount(), input.getCategory()));
Expand Down

0 comments on commit a334e49

Please sign in to comment.