fix
This commit is contained in:
parent
46e642be51
commit
4bff439291
@ -64,7 +64,6 @@ public class BaseController {
|
|||||||
return localUserManager.getByAuth(SecurityContextHolder.getContext().getAuthentication());
|
return localUserManager.getByAuth(SecurityContextHolder.getContext().getAuthentication());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the gravity.
|
* Gets the gravity.
|
||||||
*
|
*
|
||||||
@ -74,7 +73,7 @@ public class BaseController {
|
|||||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||||
if (auth != null && auth.isAuthenticated()) {
|
if (auth != null && auth.isAuthenticated()) {
|
||||||
LocalUser localUser = localUserManager.getByAuth(auth);
|
LocalUser localUser = localUserManager.getByAuth(auth);
|
||||||
if (localUser.getSettings().containsKey("gravity")) {
|
if (localUser.getSettings() != null && localUser.getSettings().containsKey("gravity")) {
|
||||||
try {
|
try {
|
||||||
return Double.parseDouble(localUser.getSettings().get("gravity"));
|
return Double.parseDouble(localUser.getSettings().get("gravity"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user