Closed RigelAC closed 9 years ago
May also be due to leaving "Age As Of Anthrocon" as "Click To Select".
Whoops! model_checks.py has a way to catch an invalid birthdate, but I accidentally added this line before that check. It's easy to fix, at least.
Fixed in ac-staging.
Submitted valid pre-reg form without populating the "Where Do You Want To Help" section and left "Age" value as "Click To Select". Received the following 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 82, in attendee_misc if not attendee.can_volunteer and attendee.staffing and attendee.badge_type != STAFF_BADGE and PRE_CON: File "/usr/local/anthrocon/plugins/uber/uber/models.py", line 606, in can_volunteer return session.age_group_from_birthdate(self.birthdate).can_volunteer File "/usr/local/anthrocon/plugins/uber/uber/models.py", line 1201, in age_group_from_birthdate attendee_age = int((datetime.date(calc_date) - datetime.date(birthdate)).days / 365.2425) TypeError: descriptor 'date' requires a 'datetime.datetime' object but received a 'str'