Skip to content

Commit d4f7dfa

Browse files
committed
Fixed none serialization for format_time
1 parent 750a5fd commit d4f7dfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/polymarket_apis/types/gamma_types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
from .common import Base, EthAddress, FlexibleDatetime, Keccak256
1717

1818

19-
def format_time(dt: datetime) -> str:
19+
def format_time(dt: Optional[datetime]) -> Optional[str]:
20+
if dt is None:
21+
return None
2022
return dt.strftime("%Y-%m-%dT%H:%M:%SZ")
2123

2224

0 commit comments

Comments
 (0)