Skip to content

Commit 10ff371

Browse files
committed
Don't attempt to add users to a freshly-created empty group
1 parent 14b1cf0 commit 10ff371

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/syncengine/syncengine.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ func (s *SyncEngine) FullSyncGroups(ctx context.Context, c *Cache, out *Outcome)
171171
out.CreatedGroups = append(out.CreatedGroups, createdGroups...)
172172

173173
for n, createdGroup := range createdGroups {
174+
if len(originalGroup.MemberUserIDs) == 0 {
175+
// Can't add nobody to the group.
176+
continue
177+
}
174178
originalGroup := groupsToCreate[n]
175179
members := make([]string, 0, len(originalGroup.MemberUserIDs))
176180
for _, idpID := range originalGroup.MemberUserIDs {

0 commit comments

Comments
 (0)