Skip to content

Commit

Permalink
Merge branch 'main' into pyup-update-tox-4.5.1-to-4.11.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cguardia committed Nov 18, 2023
2 parents 476755a + 332ba0f commit 7923e45
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ email_validator==2.0.0.post2
pydantic==1.10.8
simpleeval==0.9.13
Sphinx==7.0.1
Click==8.1.3
Click==8.1.5
sphinx-autodoc-typehints==1.23.4
sphinxcontrib.spelling==5.4.0
sphinxcontrib.apidoc==0.3.0
8 changes: 7 additions & 1 deletion questions/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,13 @@ def _add_elements(self, survey, form, top_level=False, container_name="questions
self._add_elements(page, element.form)
survey.pages.append(page)
elif isinstance(element, (FormPage, FormPanel)):
container = getattr(survey, container_name)
container = getattr(survey, container_name, None)
if container is None:
pages = survey.pages
if len(pages) > 0:
container = getattr(pages[0], container_name)
if container is None:
raise "Error in form definition: container not found."
if element.dynamic:
panel = PanelDynamicBlock(name=name, **element.params)
new_container_name = "template_elements"
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
email_validator==2.0.0.post2
Jinja2==3.1.2
pydantic==1.10.8
pydantic==1.10.11
requests==2.31.0
simpleeval==0.9.13
typing-extensions==4.5.0;python_version<"3.8"
typing-extensions==4.8.0;python_version<"3.8"
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ wheel==0.40.0
watchdog==3.0.0
flake8==6.0.0
tox==4.11.3
coverage==7.2.5
coverage==7.3.1
Sphinx==7.0.1
twine==4.0.2
Click==8.1.3
Click==8.1.5
pytest==7.3.1
black==23.3.0
sphinx-autodoc-napoleon-typehints==2.1.6
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Click>=7.0",
"email_validator",
"Jinja2",
"pydantic",
"pydantic==1.10.11",
"requests",
"simpleeval",
]
Expand Down

0 comments on commit 7923e45

Please sign in to comment.