Skip to content

Commit

Permalink
Fix json default error
Browse files Browse the repository at this point in the history
  • Loading branch information
dfangl committed Oct 15, 2024
1 parent 3f0c30d commit 05a82a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moto/iam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import re
import string
from datetime import datetime
from datetime import date, datetime
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
from urllib import parse

Expand Down Expand Up @@ -102,7 +102,7 @@ def mark_account_as_visited(


def _serialize_version_datetime(value: Any) -> str:
if isinstance(value, datetime):
if isinstance(value, date):
return value.strftime("%Y-%m-%d")
raise TypeError("Unable to serialize value.")

Expand Down

0 comments on commit 05a82a9

Please sign in to comment.