add logs in get_problem_responses

This commit is contained in:
Ali-D-Akbar
2020-08-24 15:24:24 +05:00
committed by Awais Jibran
parent 63567122fd
commit ace525dd0c
2 changed files with 2 additions and 1 deletions

View File

@@ -79,7 +79,7 @@ const createProblemResponsesReportTask = (
})
.then(
json => dispatch(getTaskStatus(taskStatusEndpoint, json.task_id)),
() => dispatch(problemResponsesFailure(gettext('Unable to submit request to generate report.'))),
err => dispatch(problemResponsesFailure(gettext('Unable to submit request to generate report.'))), // eslint-disable-line no-unused-vars
);
};

View File

@@ -1055,6 +1055,7 @@ def get_problem_responses(request, course_id):
for problem_location in problem_locations.split(','):
problem_key = UsageKey.from_string(problem_location).map_into_course(course_key)
except InvalidKeyError:
log.exception("ProblemResponsesError: Location: %s", problem_locations)
return JsonResponseBadRequest(_("Could not find problem with this location."))
task = task_api.submit_calculate_problem_responses_csv(