Skip to content

Fix bug with committee overview in prod #2027

@exalate-issue-sync

Description

@exalate-issue-sync

cf run-task fecfile-web-api --command "python django-backend/manage.py get_overview" --name "get-overview"
cf logs fecfile-web-api | grep get-overview

error:

 2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR FAILED to execute get_overview command

2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR Traceback (most recent call last):
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/app/django-backend/manage.py", line 57, in
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR execute_from_command_line(sys.argv)
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/deps/0/python/lib/python3.13/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR utility.execute()
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~~~~~~~~~^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/deps/0/python/lib/python3.13/site-packages/django/core/management/init.py", line 436, in execute
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR self.fetch_command(subcommand).run_from_argv(self.argv)
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/deps/0/python/lib/python3.13/site-packages/django/core/management/base.py", line 420, in run_from_argv
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR self.execute(*args, **cmd_options)
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/deps/0/python/lib/python3.13/site-packages/django/core/management/base.py", line 464, in execute
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR output = self.handle(*args, **options)
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/app/django-backend/fecfiler/devops/management/commands/fecfile_base.py", line 33, in handle
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR self.command(*args, **options)
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/app/django-backend/fecfiler/devops/management/commands/get_overview.py", line 44, in command
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR get_num_transactions_per_contact()
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/app/django-backend/fecfiler/devops/utils/common_queries.py", line 147, in get_num_transactions_per_contact
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR averages = get_averages(contact_transaction_counts)
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR File "/home/vcap/app/django-backend/fecfiler/devops/utils/common_queries.py", line 31, in get_averages
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR "3rd quartile": third_q[-1],
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR ~~~~~~~^^^^
2026-05-07T13:41:52.82-0400 [APP/TASK/get-overview/0] ERR IndexError: list index out of range
2026-05-07T13:41:53.04-0400 [APP/TASK/get-overview/0] OUT Exit status 1

Documentation/background: https://github.com/fecgov/fecfile-web-api/wiki/Common-Queries

QA Notes

null

DEV Notes

null

Design

null

See full ticket and images here: FECFILE-3112

Pull Request: #2032

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions