Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when publishing rankings based on a custom attribute #288

Open
joergewald opened this issue May 30, 2021 · 0 comments
Open

Bug when publishing rankings based on a custom attribute #288

joergewald opened this issue May 30, 2021 · 0 comments
Assignees
Labels

Comments

@joergewald
Copy link
Member

  1. Imported an FSDB file which defines a custom attribute "SportClass" for every pilot
  2. Added a ranking "Sports Class", based on custom attribute "SportClass"=1
  3. Checking tracks and scoring worked fine.
  4. Published the results.
  5. Calling up the results HTML gave this error:

[2021-05-29 13:06:07,923] ERROR in app: Exception on /task_result/9 [GET]
Traceback (most recent call last):
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/sid/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/app/airscore/public/views.py", line 510, in task_result
result_file = frontendUtils.get_pretty_data(file)
File "/app/airscore/core/frontendUtils.py", line 1452, in get_pretty_data
and r['custom'][str(s['attr_id'])] == s['rank_value'])
KeyError: '3'

  1. Removed the "Sports Class" ranking
  2. Re-scored, re-published the results
  3. Now calling up the results HTML worked fine

It would seem that producing the results HTML for rankings based on custom attributes is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants