Skip to content

fix tag bugs #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 4, 2023
Merged

fix tag bugs #146

merged 4 commits into from
Feb 4, 2023

Conversation

popstk
Copy link
Contributor

@popstk popstk commented Feb 3, 2023

  1. 文章 -> 标签 -> 所有标签 -> 清理未使用的标签 可复现
func (t tagServiceImpl) Delete(ctx context.Context, id int32) error {
	err := dal.Transaction(ctx, func(txCtx context.Context) error {
		tagDAL := dal.GetQueryByCtx(txCtx).Tag
		_, err := tagDAL.WithContext(txCtx).Where(tagDAL.ID.Value(id)).Delete()
		if err != nil {
			return WrapDBErr(err)
		}

		postTagDAL := dal.GetQueryByCtx(txCtx).PostTag
		_, err = postTagDAL.WithContext(txCtx).Where(postTagDAL.TagID.Eq(id)).Delete()  //  this line 
		return err
	})

	return err
}
  1. 文章 -> 标签 -> 选择一个标签 -> 保存 找不到接口

@1379 1379 merged commit 96ffcad into go-sonic:master Feb 4, 2023
@1379
Copy link
Contributor

1379 commented Feb 4, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants