diff --git a/src/user.cc b/src/user.cc index b092f82060..94aecf5e8b 100644 --- a/src/user.cc +++ b/src/user.cc @@ -615,7 +615,7 @@ error User::LoadUserAndRelatedDataFromJSONString( // Handle missing workspace issue. // If default wid is missing there are no workspaces - if (!root["data"].isMember("default_wid")) { + if (!root["data"].isMember("workspaces") || root["data"]["workspaces"].size() == 0) { return error("You no longer have access to your last workspace"); // NOLINT }