Skip to content

Commit 9dbc2ec

Browse files
committed
fixed validation_layout in pages
1 parent e746bdb commit 9dbc2ec

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

dash/dash.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,20 +2075,21 @@ def update(pathname, search):
20752075
_validate.validate_registry(_pages.PAGE_REGISTRY)
20762076

20772077
# Set validation_layout
2078-
self.validation_layout = html.Div(
2079-
[
2080-
page["layout"]() if callable(page["layout"]) else page["layout"]
2081-
for page in _pages.PAGE_REGISTRY.values()
2082-
]
2083-
+ [
2084-
# pylint: disable=not-callable
2085-
self.layout()
2086-
if callable(self.layout)
2087-
else self.layout
2088-
]
2089-
)
2090-
if _ID_CONTENT not in self.validation_layout:
2091-
raise Exception("`dash.page_container` not found in the layout")
2078+
if not self.config.suppress_callback_exceptions:
2079+
self.validation_layout = html.Div(
2080+
[
2081+
page["layout"]() if callable(page["layout"]) else page["layout"]
2082+
for page in _pages.PAGE_REGISTRY.values()
2083+
]
2084+
+ [
2085+
# pylint: disable=not-callable
2086+
self.layout()
2087+
if callable(self.layout)
2088+
else self.layout
2089+
]
2090+
)
2091+
if _ID_CONTENT not in self.validation_layout:
2092+
raise Exception("`dash.page_container` not found in the layout")
20922093

20932094
# Update the page title on page navigation
20942095
self.clientside_callback(

0 commit comments

Comments
 (0)