Skip to content

fix: use TagStatusDeleted instead of QuestionStatusDeleted in tag permission - #1571

Open
Duansg wants to merge 1 commit into
apache:mainfrom
Duansg:fix/tag-permission-status-constant
Open

fix: use TagStatusDeleted instead of QuestionStatusDeleted in tag permission#1571
Duansg wants to merge 1 commit into
apache:mainfrom
Duansg:fix/tag-permission-status-constant

Conversation

@Duansg

@Duansg Duansg commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

GetTagPermission compared the tag status against entity.QuestionStatusDeleted when deciding whether to expose the undelete action. The function operates on tag status, and the sibling delete / merge checks already use entity.TagStatusDeleted, so this aligns the undelete check with them.

Both constants are currently 10, so there is no behavior change; this only removes a latent inconsistency that would break tag recovery if the values ever diverge.

Changes

  • internal/service/permission/tag_permission.go: entity.QuestionStatusDeletedentity.TagStatusDeleted

Testing

  • go build ./internal/service/permission/ passes

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.

1 participant