From d1becf0ffa14f00dd17c5fb441164608805203e9 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:56:22 +0800 Subject: [PATCH] fix AddCollectionDefaultGroup return Add ID --- internal/repo/collection/collection_group_repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/repo/collection/collection_group_repo.go b/internal/repo/collection/collection_group_repo.go index 405cb6dd..734d4307 100644 --- a/internal/repo/collection/collection_group_repo.go +++ b/internal/repo/collection/collection_group_repo.go @@ -40,12 +40,12 @@ func (cr *collectionGroupRepo) AddCollectionDefaultGroup(ctx context.Context, us DefaultGroup: schema.CG_DEFAULT, UserID: userID, } - _, err = cr.data.DB.Insert(defaultGroup) if err != nil { err = errors.InternalServer(reason.DatabaseError).WithError(err).WithStack() return } + collectionGroup = defaultGroup return }