Skip to content

Commit 21e5ca8

Browse files
committed
Don't restrict datetime instances
1 parent 464f7a7 commit 21e5ca8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

temporalio/worker/workflow_sandbox/_restrictions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import warnings
1818
from copy import copy, deepcopy
1919
from dataclasses import dataclass
20+
from datetime import datetime
2021
from typing import (
2122
Any,
2223
Callable,
@@ -946,7 +947,7 @@ def r_op(obj: Any, other: Any) -> Any:
946947

947948
def _is_restrictable(v: Any) -> bool:
948949
return v is not None and not isinstance(
949-
v, (bool, int, float, complex, str, bytes, bytearray)
950+
v, (bool, int, float, complex, str, bytes, bytearray, datetime)
950951
)
951952

952953

0 commit comments

Comments
 (0)