-
Notifications
You must be signed in to change notification settings - Fork 58
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
Putting a number for school creates an invalid profile state #3746
Comments
It's possible this is a broader issue related to ESP-Website/esp/esp/db/forms.py Line 156 in b404807
|
Indeed, it looks like the clean function takes this to be an object ID: ESP-Website/esp/esp/db/forms.py Lines 240 to 252 in b404807
I think the easiest fix here might be to change the front end functionality so that when a number is manually entered, we make it clear that this isn't an autocomplete value: ESP-Website/esp/esp/db/forms.py Lines 58 to 97 in b404807
Another option (probably easier) is to require that manual values are not only numbers (via regex maybe). |
Actually, I think an even easier change would be to use ESP-Website/esp/esp/db/forms.py Lines 262 to 263 in b404807
If the object with that ID doesn't exist, then we should just return |
If a student enters a number for the K12 school field, the profile form will submit fine. However, upon trying to submit the profile form again, it will then error with the following message:
My guess is that the form validation guesses that these numeric values correspond to a K12 School object, rather than just a string and then attempts to look up the object (but finds none).
The text was updated successfully, but these errors were encountered: