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

Skip a fields statement if it is a dictionary instead of a list in the review generator #142

Merged
merged 2 commits into from
May 23, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ code: |
generic_question_blocks = []
sections_temp = []
for doc in yaml_parsed:
if doc:
if doc and any(key in doc for key in ["fields", "question", "objects", "sections", "metadata"]):
question = {"question": doc.get('question',"").strip() }
generic_object = doc.get("generic object")
if generic_object:
generic_question_blocks.append(doc)
continue
fields_temp = []
if 'fields' in doc:
if 'fields' in doc and isinstance(doc["fields"], list):
for field in doc["fields"]:
if field and "code" in field:
try:
Expand Down Expand Up @@ -133,6 +133,7 @@ code: |
del objects_temp
del questions_temp
del sections_temp

---
code: |
REVIEW_EVENT_NAME = "review_form"
Expand Down
Loading