Skip to content

Commit

Permalink
hotfix to address Mati bug
Browse files Browse the repository at this point in the history
  • Loading branch information
matin committed Dec 6, 2019
1 parent 5ee486b commit 30e882a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mati/resources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class Resource:

def __post_init__(self) -> None:
for attr, value in self.__dict__.items():
if attr.startswith('date'):
if attr.startswith('date') and value:
setattr(self, attr, iso8601.parse_date(value))
6 changes: 3 additions & 3 deletions mati/resources/identities.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class Identity(Resource):
_endpoint: ClassVar[str] = '/v2/identities'

id: str
dateCreated: dt.datetime
dateUpdated: dt.datetime
alive: Optional[bool]
status: str
dateCreated: Optional[dt.datetime] = None
dateUpdated: Optional[dt.datetime] = None
alive: Optional[bool] = None
annotatedStatus: Optional[str] = None
user: Optional[str] = None
metadata: Union[dict, List[str]] = field(default_factory=dict)
Expand Down

0 comments on commit 30e882a

Please sign in to comment.