Uh oh!
There was an error while loading. Please reload this page.
fix(social): get_students 400s on nonexistent courses.user_id (#158) - #253
fix(social): get_students 400s on nonexistent courses.user_id (#158)#253Jose-Gael-Cruz-Lopez wants to merge 3 commits into
Conversation
Warning Review limit reached
More reviews will be available in 59 minutes and 18 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ 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 |
Deploying with |
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs | frontend | a9f1dd5 | Jun 22 2026, 04:12 AM |
Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | 3fc48bb | Commit Preview URL Branch Preview URL | Jun 24 2026, 02:42 PM |
AndresL230
commented
Jun 25, 2026
AndresL230
commented
Jun 27, 2026
Reopening. Closed as superseded by #279, but this is an app-logic bugfix ( |
AndresL230
commented
Jul 15, 2026
Closing this as superseded — the bug it targets is already fixed on To be clear up front: the diagnosis in this PR was correct when it was written. What superseded itPR #270 ( enrollment_rows=table("enrollments").select("user_id,course_offerings(courses(course_name))")
name_map=get_display_names([u["id"] foruinusers])That's the same fix this PR set out to make, arrived at independently, plus the Why it can't be merged forwardThis branch carries migrations up to
GitHub already reports this as The tests would need rewriting, not rebasing
Worth salvaging separatelyOne idea here is better than what's on Also surfaced while reviewing, unrelated to this PR and present on Thanks @Jose-Gael-Cruz-Lopez — the analysis was right, the schema just moved. Closing. |
After the #12 course_id migration,
coursesis a shared catalog with nouser_id(enrollment lives inuser_courses).get_studentsrantable("courses").select("user_id,course_name")and indexedcourses_by_user[c["user_id"]]. PostgREST rejects selecting a nonexistent column with HTTP 400 (column courses.user_id does not exist), so the entire students / class-intel endpoint errored — and it's live (frontend/src/lib/api.tsgetStudents).Fix —
backend/routes/social.pyJoin through
user_coursesand embed the course name:Tests —
backend/tests/test_social_get_students.pyuser_coursesand never selectsuser_id,course_nameoffcourses.Verification
ruff check .clean; gated suite green (+3 new). The new tests fail against the pre-fix code (the catalog path yields no enrollments), confirming real coverage.Closes#158.