From f2de0e0ba3b37f21d0ecf4264d3ffe976869a04b Mon Sep 17 00:00:00 2001 From: _Bastler Date: Mon, 4 Oct 2021 20:04:17 +0200 Subject: [PATCH] fix karma --- src/main/java/de/bstly/board/businesslogic/UserManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/bstly/board/businesslogic/UserManager.java b/src/main/java/de/bstly/board/businesslogic/UserManager.java index 480efb2..9620991 100644 --- a/src/main/java/de/bstly/board/businesslogic/UserManager.java +++ b/src/main/java/de/bstly/board/businesslogic/UserManager.java @@ -241,7 +241,8 @@ public class UserManager implements UserDetailsService, SmartInitializingSinglet if (!user.getMetadata().containsKey("points")) { long points = 0; - for (Entry entry : entryRepository.findAll(qEntry.author.equalsIgnoreCase(username))) { + for (Entry entry : entryRepository + .findAll(qEntry.author.equalsIgnoreCase(user.getUsername()))) { points += entryManager.getUserPoints(entry.getId(), user.getUsername()); } user.getMetadata().put("points", points);