-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update course members sections #41
base: master
Are you sure you want to change the base?
Conversation
…validation of course sections and sections passed.
Sorry about the previous PR, it was late at night and I got way too greedy with GPT/copilot. Hope the changes make more sense now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't the goal of your task, but idk this endpoint seems kinda messy. I would prefer to see an actual schema of what the response object looks like. An example is something like:
{
"data": ...the new serialized course member after update,
"error": ...an error object if there is one
}
app/views/course_member.py
Outdated
context={"course": course_member.course}, | ||
) | ||
if StudentSectionsRequestSerializer.is_valid(raise_exception=True): | ||
section_ids = StudentSectionsRequestSerializer._validated_data.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fields that start with _
usually aren't meant to be accessed directly. Are you sure this is the correct pattern here?
I feel like there is a clean()
method on serializers that returns the validated data
…le-backend into update-course-members-sections
action
decorator to set up endpoint:api/v1/course-members/{id}/update-sections/
UpdateStudentsSectionRequest
inviews/course_member.py