From 847dd76fc891be016ec60838e6e2df959ccc4cfa Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Tue, 19 Jan 2021 12:55:58 +0100 Subject: [PATCH] test fix --- .../src/main/java/com/plannaplan/entities/User.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buisnesslogic/src/main/java/com/plannaplan/entities/User.java b/buisnesslogic/src/main/java/com/plannaplan/entities/User.java index d14411f..8758a24 100755 --- a/buisnesslogic/src/main/java/com/plannaplan/entities/User.java +++ b/buisnesslogic/src/main/java/com/plannaplan/entities/User.java @@ -48,8 +48,9 @@ public class User { } public void removeGroup(Long id) { - final Groups groupToDelete = this.studentRegisteredGrups.stream().filter(e -> e.getId().equals(id)).findFirst().get(); - this.studentRegisteredGrups.remove(groupToDelete); + final Groups groupToDelete = this.studentRegisteredGrups.stream().filter(e -> e.getId().equals(id)).findFirst() + .get(); + this.studentRegisteredGrups.remove(groupToDelete); } public void claimGroup(Groups group) { @@ -236,6 +237,9 @@ public class User { * @return ranking points [100;500] */ public Integer getRanking() { + if (ranking == null) { + return 100; + } return ranking; }