This commit is contained in:
Filip Izydorczyk 2021-01-19 12:55:58 +01:00
parent 265315b874
commit 847dd76fc8
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}