Skip to content

Commit 241c047

Browse files
committed
skip validation_layout if we're suppressing callback exceptions
1 parent e6547a5 commit 241c047

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dash/dash.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,11 @@ def layout(self, value):
432432

433433
# for using flask.has_request_context() to deliver a full layout for
434434
# validation inside a layout function - track if a user might be doing this.
435-
if self._layout_is_function and not self.validation_layout:
435+
if (
436+
self._layout_is_function
437+
and not self.validation_layout
438+
and not self.config.suppress_callback_exceptions
439+
):
436440

437441
def simple_clone(c, children=None):
438442
cls = type(c)
@@ -456,7 +460,8 @@ def simple_clone(c, children=None):
456460
_validate.validate_layout(value, layout_value)
457461
self.validation_layout = simple_clone(
458462
# pylint: disable=protected-access
459-
layout_value, [simple_clone(c) for c in layout_value._traverse_ids()]
463+
layout_value,
464+
[simple_clone(c) for c in layout_value._traverse_ids()],
460465
)
461466

462467
@property
@@ -494,7 +499,7 @@ def _config(self):
494499
"interval": int(self._dev_tools.hot_reload_interval * 1000),
495500
"max_retry": self._dev_tools.hot_reload_max_retry,
496501
}
497-
if self.validation_layout:
502+
if self.validation_layout and not self.config.suppress_callback_exceptions:
498503
config["validation_layout"] = self.validation_layout
499504

500505
return config

0 commit comments

Comments
 (0)