Skip to content
Snippets Groups Projects
Commit 3066cccb authored by William Enright's avatar William Enright
Browse files

Extra check for device registration with no groups

Change-Id: I4765ddc539753eb3e5cbc1fa058e174cd57f02d4
parent 6a997a2c
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ public class RegisterDeviceFlow {
statementList = new StatementList();
statementList.addStatement(new StatementElement("username", "=", username, ""));
if (dataStore.getUserGroupMappingsDao().getObjects(statementList) != null) {
if (dataStore.getUserGroupMappingsDao().getObjects(statementList) != null && !dataStore.getUserGroupMappingsDao().getObjects(statementList).isEmpty()) {
UserGroupMapping mapping = dataStore.getUserGroupMappingsDao().getObjects(statementList).get(0);
List<String> list = new ArrayList<>();
if (mapping.getUsername().equals(userProfile.getUsername())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment