vu-rdm-tech / adminyoda

A simple implementation of a "shadow database" to store administrative information and generate usage reports.
0 stars 1 forks source link

Vault and delta stats not shown for project 7 #29

Closed peer35 closed 5 months ago

peer35 commented 5 months ago

https://adminyoda.labs.vu.nl/projects/7

ERROR 2024-01-29 12:53:35,793 django.request log_response | Internal Server Error: /projects/project_delta_chart_json/7
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/app/projects/views.py", line 414, in project_delta_chart_json
    vault.append(round(vault_stats[label]['delta'] / div, 2))
                       ~~~~~~~~~~~^^^^^^^
KeyError: '2023-10'

I think this might be because of a botched Vault Submission

peer35 commented 5 months ago

Group has no Vault folder, adminyoda rightly always expects a folder to be there.

peer35 commented 5 months ago

Even if I recreate the Vault folder there will be missing entries in the VaultStats table. I think I just have to catch the error

peer35 commented 5 months ago

fixed in https://github.com/vu-rdm-tech/adminyoda/commit/d92744e35fa7c87e99009e2175ce6a5caffd90b7