Skip to content

Commit

Permalink
special case field in _isinstance (#4298)
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 authored Nov 4, 2024
1 parent 16ed266 commit 51b0f7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions reflex/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,12 @@ def _isinstance(obj: Any, cls: GenericType, nested: bool = False) -> bool:
_isinstance(item, args[0]) for item in obj
)

if args:
from reflex.vars import Field

if origin is Field:
return _isinstance(obj, args[0])

return isinstance(obj, get_base_class(cls))


Expand Down

0 comments on commit 51b0f7d

Please sign in to comment.