diff --git a/edivorce/apps/core/utils/user_response.py b/edivorce/apps/core/utils/user_response.py index da90a1c3..56158bc0 100644 --- a/edivorce/apps/core/utils/user_response.py +++ b/edivorce/apps/core/utils/user_response.py @@ -1,5 +1,5 @@ from edivorce.apps.core.models import UserResponse, Question -from edivorce.apps.core.utils.question_step_mapping import pre_qual_step_question_mapping, question_step_mapping +from edivorce.apps.core.utils.question_step_mapping import question_step_mapping from edivorce.apps.core.utils.step_completeness import evaluate_numeric_condition from collections import OrderedDict @@ -14,10 +14,7 @@ def get_responses_from_db(bceid_user, show_errors=False, step=None, substep=None elif answer.value.strip('[').strip(']'): responses_dict[answer.question.key] = answer.value if show_errors: - if step == 'prequalification' and substep: - step_questions = pre_qual_step_question_mapping.get(substep) - else: - step_questions = question_step_mapping.get(step, []) + step_questions = question_step_mapping.get(step, []) questions = Question.objects.filter(key__in=step_questions) for question in questions: if responses_dict.get(question.key): diff --git a/edivorce/apps/core/views/main.py b/edivorce/apps/core/views/main.py index 473b2c4d..552c91ab 100644 --- a/edivorce/apps/core/views/main.py +++ b/edivorce/apps/core/views/main.py @@ -40,7 +40,7 @@ def prequalification(request, step): if not request.user.is_authenticated: responses_dict = get_responses_from_session(request) else: - responses_dict = get_responses_from_db(request.user, show_errors=True, step='prequalification', substep=step) + responses_dict = get_responses_from_db(request.user) responses_dict['active_page'] = 'prequalification' responses_by_step = get_responses_from_db_grouped_by_steps(request.user) responses_dict['step_status'] = get_step_status(responses_by_step)