From c6c56f316925d54a519487b087e7ac9e99b3ee8e Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 11 Nov 2024 13:06:25 -0800 Subject: [PATCH] technically it has to be a mapping, not specifically a dict --- reflex/utils/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reflex/utils/types.py b/reflex/utils/types.py index 0b51cb432..9361c1ce4 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -18,6 +18,7 @@ from typing import ( Iterable, List, Literal, + Mapping, Optional, Sequence, Tuple, @@ -523,7 +524,7 @@ def does_obj_satisfy_typed_dict(obj: Any, cls: GenericType) -> bool: Returns: Whether the object satisfies the typed dict. """ - if not isinstance(obj, dict): + if not isinstance(obj, Mapping): return False key_names_to_values = get_type_hints(cls)