-
Notifications
You must be signed in to change notification settings - Fork 291
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
🪲 Check if classes and levels exist in adv #5292
Conversation
website/for_teachers.py
Outdated
if body.get("classes") and current_adventure.get('classes'): | ||
current_classes = current_adventure["classes"] |
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.
Imagine current_adventure
being an existing adventure. It most likely doesn't have classes, therefore the next line should be changed.
if body.get("classes") and current_adventure.get('classes'): | |
current_classes = current_adventure["classes"] | |
if body.get("classes"): | |
current_classes = current_adventure.get('classes', []) |
Same goes for the levels you made below and all other places you use classes as well!
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.
These are the only places
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.
Great, will keep an eye and see it on prod.! Thanks:))
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
Fixes #5289