aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/api/resource/ServerResource.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/ServerResource.java b/src/main/java/org/traccar/api/resource/ServerResource.java
index 76c8e14c7..2a72d2773 100644
--- a/src/main/java/org/traccar/api/resource/ServerResource.java
+++ b/src/main/java/org/traccar/api/resource/ServerResource.java
@@ -93,8 +93,10 @@ public class ServerResource extends BaseResource {
server.setOpenIdEnabled(openIdProvider != null);
server.setOpenIdForce(openIdProvider != null && openIdProvider.getForce());
User user = permissionsService.getUser(getUserId());
- if (user != null && user.getAdministrator()) {
- server.setStorageSpace(Log.getStorageSpace());
+ if (user != null) {
+ if (user.getAdministrator()) {
+ server.setStorageSpace(Log.getStorageSpace());
+ }
} else {
server.setNewServer(UserUtil.isEmpty(storage));
}