Skip to content
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

Fix empty ephemeral tags in post drafts if the draft is saved with no tags #1458

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

Oaphi
Copy link
Member

@Oaphi Oaphi commented Dec 1, 2024

closes #1457

This PR fixes an issue with saving post drafts with no tags. Due to a null value coming from a completely empty tag field, we end up persisting a nil value in Redis. This results in conversion to an empty string on load, which in turn ends up showing an empty tag box in the field.

Also introduces a daily job for automatic cleanup of drafts (for now, the only action is to non-destructively fix existing drafts).

@Oaphi Oaphi requested a review from a team December 1, 2024 16:44
@Oaphi Oaphi added the area: ruby Changes to server-side code label Dec 1, 2024
@Oaphi Oaphi self-assigned this Dec 1, 2024
@cellio
Copy link
Member

cellio commented Dec 3, 2024

I tested and do not see the bug on this branch, but I do on develop. (I don't have anything to say about the script, sorry.)

@ArtOfCode- ArtOfCode- merged commit 0d7d397 into develop Dec 3, 2024
7 checks passed
@ArtOfCode- ArtOfCode- deleted the 0valt/1457/draft-tags branch December 3, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ruby Changes to server-side code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drafts for posts without tags load an ephemeral empty tag
3 participants