Skip to content

Commit

Permalink
Wow, unit tests actually caught the hack I said should block the PR. …
Browse files Browse the repository at this point in the history
…Gogo unit tests.
  • Loading branch information
dhakim87 committed Oct 9, 2020
1 parent e73055a commit 1c06caf
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions microsetta_private_api/repo/survey_answers_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,19 @@ def find_survey_template_id(self, survey_answers_id):
# in dev builds)
# TODO: It's even worse than I feared. Some of our primary
# surveys are ALSO vioscreen surveys with the same key. wtf.
# if len(rows) == 0:
vioscreen_repo = VioscreenRepo(self._transaction)
status = vioscreen_repo._get_vioscreen_status(survey_answers_id)
if status is not None:
return SurveyTemplateRepo.VIOSCREEN_ID
else:
return None
# TODO: Maybe this should throw an exception, but doing so
# locks the end user out of the minimal implementation
# if they submit an empty survey response.
# raise RepoException("No answers in survey: %s" %
# survey_answers_id)
if len(rows) == 0:
vioscreen_repo = VioscreenRepo(self._transaction)
status = vioscreen_repo._get_vioscreen_status(
survey_answers_id)
if status is not None:
return SurveyTemplateRepo.VIOSCREEN_ID
else:
return None
# TODO: Maybe this should throw an exception, but doing so
# locks the end user out of the minimal implementation
# if they submit an empty survey response.
# raise RepoException("No answers in survey: %s" %
# survey_answers_id)

arbitrary_question_id = rows[0][1]
cur.execute("SELECT surveys.survey_id FROM "
Expand Down

0 comments on commit 1c06caf

Please sign in to comment.