Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quality assurance updates #772

Merged
merged 8 commits into from
Dec 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: short-circuit evaluation of empty QA
  • Loading branch information
dodumosu committed Dec 13, 2020
commit ca72a667b860a68ca53c31b9327d365491326985
4 changes: 4 additions & 0 deletions apollo/submissions/qa/query_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ def generate_qa_queries(form):

def get_logical_check_stats(query, form, condition):
complete_expression = build_expression(condition)
# short-circuit for empty QA
if complete_expression == '':
return [('Missing', query.count())]

qa_query, question_codes = generate_qa_query(complete_expression, form)

# add joins as necessary
Expand Down