fix npe
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s

This commit is contained in:
Lee 2024-08-01 01:24:32 +01:00
parent 560fce9b01
commit 1d4e19bd3c

@ -216,10 +216,10 @@ public class ScoreSaberPlatform extends Platform {
if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches
return false;
}
double oldPp = score.getPp();
double oldPp = score.getPp() == null ? 0 : score.getPp();
double pp = this.getPp(leaderboard.getStars(), score.getAccuracy());
log.info("Leaderboard: {}, Old PP: {}, New PP: {}", leaderboard.getSongName(), oldPp, pp);
return pp != score.getPp(); // Check if the pp has changed
return pp != oldPp; // Check if the pp has changed
}).toList();
for (TrackedScore score : toUpdate) { // Update the scores