You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen someone in the production logs try to set a first paediatric assessment date in 2016. We don't want to accept that on the platform as it's not in a cohort open for submission. But for the user it silently fails - they click the button and nothing happens.
It also causes an unhandled exception in the backend:
django-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
django-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django-1 | File "/app/epilepsy12/decorator.py", line 398, in wrapper
django-1 | return view(request, *args, **kwargs)
django-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django-1 | File "/app/epilepsy12/decorator.py", line 309, in wrapper
django-1 | return view(request, *args, **kwargs)
django-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django-1 | File "/usr/local/lib/python3.11/site-packages/django/contrib/auth/decorators.py", line 60, in _view_wrapper
django-1 | return view_func(request, *args, **kwargs)
django-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django-1 | File "/app/epilepsy12/views/registration_views.py", line 619, in first_paediatric_assessment_date
django-1 | validate_and_update_model(
django-1 | File "/app/epilepsy12/common_view_functions/validate_form_update_model.py", line 149, in validate_and_update_model
django-1 | child_cohort_data = cohorts_and_dates(
django-1 | ^^^^^^^^^^^^^^^^^^
django-1 | File "/app/epilepsy12/general_functions/cohort_number.py", line 154, in cohorts_and_dates
django-1 | "grace_cohort": dates_for_cohort(cohort=submitting_cohort_number - 1),
django-1 | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
django-1 | TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
django-1 | ERROR [django.server] "POST /case/1/first_paediatric_assessment_date HTTP/1.1" 500 104032
We should fix the crash and ensure we show a useful error message to the user
The text was updated successfully, but these errors were encountered:
I've seen someone in the production logs try to set a first paediatric assessment date in 2016. We don't want to accept that on the platform as it's not in a cohort open for submission. But for the user it silently fails - they click the button and nothing happens.
It also causes an unhandled exception in the backend:
We should fix the crash and ensure we show a useful error message to the user
The text was updated successfully, but these errors were encountered: