Skip to content

Commit

Permalink
Fixing search by group name qhen creating groups
Browse files Browse the repository at this point in the history
Closes #872

Signed-off-by: Pedro Igor <[email protected]>
  • Loading branch information
pedroigor committed Jul 1, 2024
1 parent cf39aae commit ad872a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ private void createGroups(RealmContext context, int startIndex, int endIndex, bo
String parentGroupName = getParentGroupName(groupName);

if (parentGroupName != null) {
Optional<GroupModel> maybeParent = session.groups().searchForGroupByNameStream(realm, parentGroupName, true, 1, 1).findFirst();
Optional<GroupModel> maybeParent = session.groups().searchForGroupByNameStream(realm, parentGroupName, true, -1, -1).findFirst();
maybeParent.ifPresent(parent -> {
GroupModel groupModel = session.groups().createGroup(realm, groupName, parent);
context.groupCreated(groupModel);
Expand Down

0 comments on commit ad872a5

Please sign in to comment.