Skip to content

Commit 941a95b

Browse files
committed
Allows strings if layout is a list
1 parent b13d9b8 commit 941a95b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dash/_validate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,13 @@ def _validate_id(comp):
439439

440440
if isinstance(layout_value, (list, tuple)):
441441
for component in layout_value:
442+
if isinstance(component, (str,)):
443+
continue
442444
if isinstance(component, (Component,)):
443445
_validate(component)
444446
else:
445447
raise exceptions.NoLayoutException(
446-
"List of components as layout must be a list of components only."
448+
"List of components as layout must be a list of strings and components only."
447449
)
448450
else:
449451
_validate(layout_value)

0 commit comments

Comments
 (0)