-
Notifications
You must be signed in to change notification settings - Fork 22
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
add script to fetch new professors/courses #38
Conversation
This PR now depends on #71. Please be sure to run migrations before updating the courses! |
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.
one side comment, looks ok otherwise. Tested with no immediate issues but didn't look very deep on the admin panel or validate against umdio responses.
# if there's more than one matching professor but | ||
# we have an alias that narrows the query down to one, | ||
# use the professor associated with that alias. | ||
if professor.count() > 1 and alias.count() == 1: | ||
professor = alias.first() |
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.
I would hope that alias.count()
is always one. If we have two aliases for the same name, that's a problem. We should add a unique=True
requirement to the alias' name field.
Depends on: