Skip to content

Commit

Permalink
email field should noe be required
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsereko committed Jan 31, 2024
1 parent 873d381 commit ebbe6bb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ public String showForm(@RequestParam(required = false, value = "userId") Integer
@ModelAttribute("user") User user, ModelMap model) {

try {
boolean isPlatformTwoPointTwoOrAbove = isPlatform22OrNewer();
model.addAttribute("hasEmailField", isPlatformTwoPointTwoOrAbove);
if (isPlatformTwoPointTwoOrAbove) {
boolean isPlatform22OrNewer = isPlatform22OrNewer();
if (isPlatform22OrNewer) {
Field emailField = getEmailField();
model.addAttribute("hasEmailField", isPlatform22OrNewer);
model.addAttribute("email", emailField.get(user));
}
} catch (IllegalArgumentException | IllegalAccessException | NullPointerException e) {
Expand Down

0 comments on commit ebbe6bb

Please sign in to comment.