Skip to content

Commit c2efe9b

Browse files
authored
Merge pull request #3359 from Erraen/pr1
Make #3351 acceptable only for sync version (async version has self-owned if not config.suppress_callback_exceptions ... block)
2 parents d9475e9 + c14256e commit c2efe9b

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

dash/dash.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,27 +2491,27 @@ def update(pathname_, search_, **states):
24912491
_validate.check_for_duplicate_pathnames(_pages.PAGE_REGISTRY)
24922492
_validate.validate_registry(_pages.PAGE_REGISTRY)
24932493

2494-
# Set validation_layout
2495-
if not self.config.suppress_callback_exceptions:
2496-
layout = self.layout
2497-
if not isinstance(layout, list):
2498-
layout = [
2499-
# pylint: disable=not-callable
2500-
self.layout()
2501-
if callable(self.layout)
2502-
else self.layout
2503-
]
2504-
self.validation_layout = html.Div(
2505-
[
2506-
page["layout"]()
2507-
if callable(page["layout"])
2508-
else page["layout"]
2509-
for page in _pages.PAGE_REGISTRY.values()
2494+
# Set validation_layout
2495+
if not self.config.suppress_callback_exceptions:
2496+
layout = self.layout
2497+
if not isinstance(layout, list):
2498+
layout = [
2499+
# pylint: disable=not-callable
2500+
self.layout()
2501+
if callable(self.layout)
2502+
else self.layout
25102503
]
2511-
+ layout
2512-
)
2513-
if _ID_CONTENT not in self.validation_layout:
2514-
raise Exception("`dash.page_container` not found in the layout")
2504+
self.validation_layout = html.Div(
2505+
[
2506+
page["layout"]()
2507+
if callable(page["layout"])
2508+
else page["layout"]
2509+
for page in _pages.PAGE_REGISTRY.values()
2510+
]
2511+
+ layout
2512+
)
2513+
if _ID_CONTENT not in self.validation_layout:
2514+
raise Exception("`dash.page_container` not found in the layout")
25152515

25162516
# Update the page title on page navigation
25172517
self.clientside_callback(

0 commit comments

Comments
 (0)