removes empty list entries (#1523)
This commit is contained in:
parent
2971425544
commit
1c90b65bca
1 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,7 @@ public class AccountWebController {
|
|||
|
||||
@GetMapping("/login")
|
||||
public String login(HttpServletRequest request, Model model, Authentication authentication) {
|
||||
|
||||
if (authentication != null && authentication.isAuthenticated()) {
|
||||
return "redirect:/";
|
||||
}
|
||||
|
@ -72,6 +73,10 @@ public class AccountWebController {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Remove any null keys/values from the providerList
|
||||
providerList
|
||||
.entrySet()
|
||||
.removeIf(entry -> entry.getKey() == null || entry.getValue() == null);
|
||||
model.addAttribute("providerlist", providerList);
|
||||
|
||||
model.addAttribute("loginMethod", applicationProperties.getSecurity().getLoginMethod());
|
||||
|
|
Loading…
Reference in a new issue