This commit is contained in:
aichy126 2022-09-30 16:18:04 +08:00
parent 2df21a816c
commit 8d7657454a
1 changed files with 2 additions and 4 deletions

View File

@ -61,13 +61,11 @@ func (cs *CollectionService) CollectionSwitch(ctx context.Context, dto *schema.C
return nil, err
}
if !has {
defaultGroup, err := cs.collectionGroupRepo.AddCollectionDefaultGroup(ctx, dto.UserID)
dbdefaultGroup, err := cs.collectionGroupRepo.AddCollectionDefaultGroup(ctx, dto.UserID)
if err != nil {
return nil, err
}
dto.GroupID = defaultGroup.ID
dto.GroupID = dbdefaultGroup.ID
} else {
dto.GroupID = defaultGroup.ID
}