Closed ethel-t-frog closed 7 years ago
Looks like this was introduced with the challenges feature, as line 55 of the template is where the challenge ID is added to the form.
Yup, I figured something slipped past me. I'll take a look here shortly and sort it out.
I just generated a PR that includes the commit with this bug fix. It didn't occur to me that an empty challenge id might wreak havoc with the error catching block of the submit_story view.
Let me know if you spot anything else.
If the user submits an over-length story, they will currently get a 505 instead of an error message and a request to submit a shorter story.
The error is being reported on line 822 of castle/views.py, which is the "render" call in the story sumbission error handler, and it is caused at line 55 of castle/templates/castle/edit_story.html.
Error is
ValueError: invalid literal for int() with base 10: ''