@@ -432,7 +432,11 @@ def layout(self, value):
432
432
433
433
# for using flask.has_request_context() to deliver a full layout for
434
434
# 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
+ ):
436
440
437
441
def simple_clone (c , children = None ):
438
442
cls = type (c )
@@ -456,7 +460,8 @@ def simple_clone(c, children=None):
456
460
_validate .validate_layout (value , layout_value )
457
461
self .validation_layout = simple_clone (
458
462
# 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 ()],
460
465
)
461
466
462
467
@property
@@ -494,7 +499,7 @@ def _config(self):
494
499
"interval" : int (self ._dev_tools .hot_reload_interval * 1000 ),
495
500
"max_retry" : self ._dev_tools .hot_reload_max_retry ,
496
501
}
497
- if self .validation_layout :
502
+ if self .validation_layout and not self . config . suppress_callback_exceptions :
498
503
config ["validation_layout" ] = self .validation_layout
499
504
500
505
return config
0 commit comments