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 return nil, err
} }
if !has { if !has {
dbdefaultGroup, err := cs.collectionGroupRepo.AddCollectionDefaultGroup(ctx, dto.UserID)
defaultGroup, err := cs.collectionGroupRepo.AddCollectionDefaultGroup(ctx, dto.UserID)
if err != nil { if err != nil {
return nil, err return nil, err
} }
dto.GroupID = defaultGroup.ID dto.GroupID = dbdefaultGroup.ID
} else { } else {
dto.GroupID = defaultGroup.ID dto.GroupID = defaultGroup.ID
} }