Skip to content
Snippets Groups Projects
Commit b571fdc9 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Fix data download

parent 90cb3bb8
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.82] - 2025-01-22
- Fix data download in case of survey responses that haven't been initialized for NRENs
## [0.81] - 2025-01-22 ## [0.81] - 2025-01-22
- Harden get_response_data for moving responses from a previous survey to a new survey year. - Harden get_response_data for moving responses from a previous survey to a new survey year.
- Moved response data now satisfies the dependencies of the new survey. If a question would be hidden in the new survey, the data for that question is removed. - Moved response data now satisfies the dependencies of the new survey. If a question would be hidden in the new survey, the data for that question is removed.
......
...@@ -99,7 +99,7 @@ def fetch_survey_comments(): ...@@ -99,7 +99,7 @@ def fetch_survey_comments():
'A NREN': response.nren.name, 'A NREN': response.nren.name,
'A Year': response.survey_year, 'A Year': response.survey_year,
} }
for key, val in response.answers['data'].items(): for key, val in response.answers.get('data', {}).items():
if key.endswith('_comments'): if key.endswith('_comments'):
data[key] = val data[key] = val
if len(data) > 2: # only return responses with comments if len(data) > 2: # only return responses with comments
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment