diff --git a/Changelog.md b/Changelog.md index b1587b590108c9faff1bce5e50a0a5014929c1bf..1d119f2d05fd0081511d0203c9194fe9b552f5a6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,9 @@ 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 - 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. diff --git a/compendium_v2/routes/data_download.py b/compendium_v2/routes/data_download.py index 214043e4dce186edd2ba70a565591afa19c50eee..bd394ddcbe9a84bfc1e7c0ce3dd1c3e3e75191d5 100644 --- a/compendium_v2/routes/data_download.py +++ b/compendium_v2/routes/data_download.py @@ -99,7 +99,7 @@ def fetch_survey_comments(): 'A NREN': response.nren.name, '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'): data[key] = val if len(data) > 2: # only return responses with comments