fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002
fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002ayesha1145 wants to merge 4 commits intoalphaonelabs:mainfrom
Conversation
👀 Peer Review RequiredHi @ayesha1145! This pull request does not yet have a peer review. Before this PR can be merged, please request a review from one of your peers:
Thank you for contributing! 🎉 |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated COMMUNITY dropdown label from "Learning Requests" to "Surveys" and adjusted the homepage query to exclude SuccessStory entries whose title equals "test" (case-insensitive) when selecting the latest story. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/views.py`:
- Line 324: The queryset chain assigned to latest_success_story is exceeding max
line length; break the chain into a wrapped expression using parentheses and
one-call-per-line formatting so it passes Black/flake8 (e.g., start with
SuccessStory.objects.filter(...).exclude(...).order_by(...).first() split across
lines), keeping the same call order and the variable name latest_success_story
to preserve behavior.
- Line 325: Remove the stray Markdown fence token (```) on the stray line that
makes web/views.py invalid, and reformat the long queryset assignment to
latest_success_story so it does not exceed 120 characters: break the queryset
chain across multiple lines (e.g., put each call like .filter(...),
.exclude(...), .order_by(...), .first() on its own line and align them) and
ensure the file passes Black formatting and parses as valid Python.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
web/views.py (1)
324-324:⚠️ Potential issue | 🟡 MinorWrap the queryset chain to meet the 120-character lint limit.
Line 324 is still over the project max line length; this will keep flake8/Black checks failing.
♻️ Proposed fix
- latest_success_story = SuccessStory.objects.filter(status="published").exclude(title__iexact="test").order_by("-published_at").first() + latest_success_story = ( + SuccessStory.objects.filter(status="published") + .exclude(title__iexact="test") + .order_by("-published_at") + .first() + )As per coding guidelines
**/*.py: "Format Python code with Black using 120-character line length" and "Python code must pass flake8 with max line length 120".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/views.py` at line 324, The single long queryset assignment for latest_success_story exceeds the 120-char limit; refactor the expression by breaking the SuccessStory.objects chain across multiple lines—call filter(...), then .exclude(...), then .order_by("-published_at") and finally .first() each on their own wrapped lines so the whole statement stays under 120 characters and preserves the same behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@web/views.py`:
- Line 324: The single long queryset assignment for latest_success_story exceeds
the 120-char limit; refactor the expression by breaking the SuccessStory.objects
chain across multiple lines—call filter(...), then .exclude(...), then
.order_by("-published_at") and finally .first() each on their own wrapped lines
so the whole statement stays under 120 characters and preserves the same
behavior.
All review conversations have been resolved.
Summary
Fixed duplicate navigation label in mobile menu.
Changes
"Learning Requests" appearing twice
Issue
Fixes duplicate label bug found in mobile navigation menu
Summary by CodeRabbit
Style
Bug Fixes