fix: prevent duplicate blog slug 500 in public blog view#145
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (2)
✏️ Tip: You can disable in-progress messages and the fortune message in your review settings. Tip You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.Change the ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new test module validates the BlogPostView's behavior when multiple blog posts share identical slugs, ensuring the view returns the most recently created published post. The BlogPostView is updated with a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes a Key changes:
Assessment: Confidence Score: 5/5
Last reviewed commit: 2a0e781 |
Summary
BlogPostViewto avoidMultipleObjectsReturnedwhen duplicate published slugs exist-created_at, then-id)/blog/<slug>Incident
Verification
core/tests/test_blog_post_view.py::test_blog_post_view_returns_most_recent_published_post_when_slug_is_duplicated127.0.0.1:5432connection refused), so full pytest run could not complete here.Summary by CodeRabbit
Bug Fixes
Tests