Skip to content

Coordinators adding users that don't exist #357

Open
@smartspot2

Description

In the coordinator view of a section, when attempting to add a student that does not exist (i.e. the user has not logged in to scheduler ever before), the backend errors on a query for the user associated on the email, giving a 500 server error, specifically when running the following line:

# check if the user can actually enroll in the section
student_user = User.objects.get(email=email)

The expected behavior is to create this user automatically in the backend, though this model creation should not happen if any other errors are present. This means that a small fix changing .get to .get_or_create is not optimal; we'd need to modify the flow slightly to incorporate this case into the feedback loop. This also means that the frontend would likely need to be modified, to display this case in the modal in the situation where other errors occur.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerssev5Low severity - General guidance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions