Closed mjtravers closed 2 weeks ago
Passes CR. Sending to QA.
QA review verified bug fixed for download .fec file process 500 error.
Selected Form 24, then selected "Download as .fec".
Download populated correctly.
Repeat steps above for testing of Form 1M and Form 3x. All three reports are working correctly.
QA Review Completed. Moved to Stage Ready.
Aurelia Khorsand commented: Sprint accepted 6/18/2024 during Sprint Review.
Downloading a .fec file through the UI kabob menu is failing with a 500 error from the api.
The issue is that the code needs to account for reports that do not have coverage_from_date
See problem code here: https://github.com/fecgov/fecfile-web-api/blob/develop/django-backend/fecfiler/web_services/summary/tasks.py#L24![image]([https://github.com/fecgov/fecfile-web-api/assets/2971785/5cee3c6e-90ab-428f-aed1-59156ac4d387](https://github.com/fecgov/fecfile-web-api/assets/2971785/5cee3c6e-90ab-428f-aed1-59156ac4d387))
Error from log:
10:50:41.689: [APP/PROC/WEB.1] level='error' event='task_failed' logger='django_structlog.celery.receivers' error="'NoneType' object has no attribute 'year'" exception='Traceback (most recent call last):\n File "/home/vcap/deps/0/python/lib/python3.10/site-packages/celery/app/trace.py", line 451, in trace_task\n R = retval = fun(*args, **kwargs)\n File "/home/vcap/deps/0/python/lib/python3.10/site-packages/celery/app/trace.py", line 734, in __protected_call__\n return self.run(*args, **kwargs)\n File "/home/vcap/app/django-backend/fecfiler/web_services/summary/tasks.py", line 43, in calculate_summary\n reports_to_recalculate = get_reports_to_calculate(primary_report)\n File "/home/vcap/app/django-backend/fecfiler/web_services/summary/***tasks.py", line 24***, in get_reports_to_calculate\n report_year = primary_report.coverage_from_date.year\nAttributeError: \'NoneType\' object has no attribute \'year\'' task_id='75f67477-216f-416c-9b68-104a3f63aa48' ip='216.15.29.108' request_id='a344a0e0-e4bf-4996-9b23-fdc50fc2908c' user_id='83f441d0-f5a8-41b4-ada2-f31879f3143c' _record= _from_structlog=True
QA Notes
null
DEV Notes
null
Design
null