Skip to content

Commit

Permalink
[flows] fix FlowPreview.expires_at
Browse files Browse the repository at this point in the history
  • Loading branch information
yehuda-lev committed Dec 18, 2023
1 parent 0c592cb commit 8f7bc4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pywa/types/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ class FlowPreview:
def from_dict(cls, data: dict):
return cls(
url=data["preview_url"],
expires_at=datetime.datetime.fromisoformat(data["expires_at"]),
expires_at=datetime.datetime.strptime(
data["expires_at"], "%Y-%m-%dT%H:%M:%S%z"
),
)


Expand Down

0 comments on commit 8f7bc4e

Please sign in to comment.