Skip to content

Commit 2c043c3

Browse files
Making it work in python 3.8 and 3.9
1 parent 05a96d8 commit 2c043c3

File tree

1 file changed

+1
-1
lines changed
  • aws_lambda_powertools/utilities/idempotency/serialization

1 file changed

+1
-1
lines changed

aws_lambda_powertools/utilities/idempotency/serialization/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_actual_type(model_type: Any) -> Any:
3333
origin = get_origin(model_type)
3434

3535
# Check if type is Union, Optional, or UnionType (Python 3.10+)
36-
if origin in (Union, Optional) or (sys.version_info >= (3, 10) and isinstance(origin, UnionType)):
36+
if origin in (Union, Optional) or (sys.version_info >= (3, 10) and origin in (Union, UnionType)):
3737
# Get type arguments
3838
args = get_args(model_type)
3939

0 commit comments

Comments
 (0)