Skip to content

FIX: Solutions directory item was using post creation instead of solved #361

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 1 commit into from
Apr 9, 2025

Conversation

nattsw
Copy link
Contributor

@nattsw nattsw commented Apr 9, 2025

Earlier on in the migration, the update of the user directory query was erroneously switched to use post creation date instead of the date the post was solved.

This PR fixes that.

@@ -97,7 +97,7 @@
expect(
DirectoryItem.find_by(
user_id: user.id,
period_type: DirectoryItem.period_types[:all],
period_type: DirectoryItem.period_types[:daily],
).solutions,
).to eq(1)
Copy link
Contributor Author

@nattsw nattsw Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test would otherwise fail now because the post was not created today, and should use solved date instead of post date.

@nattsw nattsw merged commit 539938b into main Apr 9, 2025
6 checks passed
@nattsw nattsw deleted the user-directory branch April 9, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants