Anthrocon-Reg / ubersystem

Anthrocon's Ubersystem - a fork of the MagFest system that handles ticketing, staffing, analytics, volunteers, and tons more
http://anthrocon.org
GNU General Public License v3.0
4 stars 0 forks source link

500 error if Age is set to future date #42

Closed RigelAC closed 9 years ago

RigelAC commented 9 years ago

Submit otherwise valid form with Age set to a future value. 500 error:

500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request. Traceback (most recent call last): File "/usr/local/anthrocon/env/lib/python3.4/site-packages/CherryPy-3.6.0-py3.4.egg/cherrypy/_cprequest.py", line 670, in respond response.body = self.handler() File "/usr/local/anthrocon/env/lib/python3.4/site-packages/CherryPy-3.6.0-py3.4.egg/cherrypy/lib/encoding.py", line 217, in call self.body = self.oldhandler(_args, _kwargs) File "/usr/local/anthrocon/env/lib/python3.4/site-packages/CherryPy-3.6.0-py3.4.egg/cherrypy/_cpdispatch.py", line 61, in call return self.callable(_self.args, _self.kwargs) File "/usr/local/anthrocon/plugins/uber/uber/decorators.py", line 122, in with_session retval = func(_args, session=session, _kwargs) File "/usr/local/anthrocon/plugins/uber/uber/decorators.py", line 212, in with_restrictions return func(_args, _kwargs) File "/usr/local/anthrocon/plugins/uber/uber/decorators.py", line 182, in with_rendering result = func(_args, _kwargs) File "/usr/local/anthrocon/plugins/uber/uber/decorators.py", line 13, in with_check return func(args,kwargs) File "/usr/local/anthrocon/plugins/uber/uber/site_sections/preregistration.py", line 106, in form message = check(attendee) or check_prereg_reqs(attendee) File "/usr/local/anthrocon/plugins/uber/uber/utils.py", line 44, in check message = attr(model) File "/usr/local/anthrocon/plugins/uber/uber/model_checks.py", line 89, in attendee_misc return 'Attendees cannot be ' + age_group.desc NameError: name 'age_group' is not defined

kitsuta commented 9 years ago

Great catch - I'll add a check for future dates.

kitsuta commented 9 years ago

This check has been added, so now uber will tell you that you cannot be born in the future. Fixed in ac-staging.