This commit is contained in:
@@ -7,6 +7,7 @@ import SuMoC.backend.user.dtos.StatScope;
|
||||
import SuMoC.backend.user.models.User;
|
||||
import SuMoC.backend.user.repository.UserRepository;
|
||||
import SuMoC.backend.user.service.CurrentUserService;
|
||||
import SuMoC.backend.user.stats.models.StatsList;
|
||||
import jakarta.transaction.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -74,10 +75,11 @@ public class StatsService {
|
||||
|
||||
User user = currentUserService.get();
|
||||
|
||||
|
||||
/* Should not be necessary because it gets always init
|
||||
if (user.getStats() == null) {
|
||||
user.setStats(new StatsList(user));
|
||||
}
|
||||
*/
|
||||
|
||||
StatScope effectiveScope = (scope == null) ? StatScope.ALL : scope;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user