We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c11040 commit 6483010Copy full SHA for 6483010
investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py
@@ -41,7 +41,7 @@ def __init__(
41
self.created_at = created_at
42
43
# Make sure that created_at is a timezone aware datetime object
44
- self.created_at.replace(tzinfo=timezone.utc)
+ self.created_at = self.created_at.replace(tzinfo=timezone.utc)
45
46
if position_snapshots is None:
47
position_snapshots = []
@@ -184,7 +184,7 @@ def from_dict(data):
184
created_at = parser.parse(created_at_str)
185
186
# Ensure created_at is timezone aware
187
- created_at.replace(tzinfo=timezone.utc)
+ created_at = created_at.replace(tzinfo=timezone.utc)
188
189
return PortfolioSnapshot(
190
net_size=data.get("net_size", 0.0),
0 commit comments