Skip to content

fix(project): refresh tags when updating lottery projects - #198

Merged
yyg-max merged 1 commit into
linux-do:masterfrom
huzhe01:fix/lottery-project-tags
Sep 19, 2026
Merged

yyg-max merged 1 commit into
linux-do:masterfrom
huzhe01:fix/lottery-project-tags

Conversation

@huzhe01

@huzhe01 huzhe01 commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

例行检查

  • 我已阅读并理解 贡献者公约,
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 MIT 许可证进行许可,
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并,

关联信息

Related to #194(该 issue 因 stale 自动关闭,但问题在当前 master 仍可复现)。

变更内容

  • 抽奖项目更新时,在同一事务中保存项目字段并刷新项目标签。
  • 按 review 意见将保存与刷新逻辑直接内联在抽奖更新分支,不再额外封装函数。

变更原因

抽奖项目的更新分支此前在 Save 后直接返回,未执行 RefreshTags。前端仍会提交 project_tags,因此界面提示更新成功,但刷新后标签会恢复为旧值。

将项目保存和标签刷新放入同一事务,也避免其中一步失败时留下部分更新。

验证

  • go test ./...
  • go vet ./...
  • go build ./...
  • git diff --check

Comment thread internal/apps/project/routers.go Outdated
@huzhe01
huzhe01 force-pushed the fix/lottery-project-tags branch from 51a3fa0 to 171f481 Compare September 18, 2026 10:20
@yyg-max
yyg-max merged commit 6d947d2 into linux-do:master Sep 19, 2026
12 checks passed
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