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 ISE when entering pre-reg signup with Volenteer and Birthdate #26

Closed Krinoo closed 9 years ago

Krinoo commented 9 years ago

Please email contact@magfest.org if you're not sure why you're seeing this page. 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 128, in with_session retval = func(_args, session=session, _kwargs) File "/usr/local/anthrocon/plugins/uber/uber/decorators.py", line 239, in with_restrictions return func(_args, _kwargs) File "/usr/local/anthrocon/plugins/uber/uber/decorators.py", line 209, 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 82, in attendee_misc return "Volunteers cannot be " + attendee.age_group.desc AttributeError: 'NoneType' object has no attribute 'desc'

Krinoo commented 9 years ago

age was "1994-11-01" and volunteer checked.

kitsuta commented 9 years ago

Oh yeah, I see what's going on.

For anyone curious, I'm in the middle of refactoring the age groups as part of the birthdate overhaul. Uber has been checking for things like "attendee.age_group == UNDER_18," which is obviously not a very configurable way to write code. The idea is to check the properties of the attendee's age group, but when you're setting the birthdate and not the age group directly, the age group has often not yet been set when the code is trying to look at it. So the refactoring I did is broken until I work to make age_group a property that can be checked at any time.

Today I have to catch up on my neglected non-uber work, but I should be able to get around to this tomorrow.

kitsuta commented 9 years ago

This should be fixed now in the MAGFest fork.