Skip to content

Commit 0c39b1d

Browse files
committed
Fix none check
1 parent 790afa8 commit 0c39b1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

investing_algorithm_framework/app/strategy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def get_take_profit_rule(self, symbol: str) -> Union[TakeProfitRule, None]:
365365
None otherwise.
366366
"""
367367

368-
if self.take_profits is not None or len(self.take_profits) == 0:
368+
if self.take_profits is None or len(self.take_profits) == 0:
369369
return None
370370

371371
if self.take_profit_rules_lookup == {}:
@@ -386,7 +386,7 @@ def get_stop_loss_rule(self, symbol: str) -> Union[StopLossRule, None]:
386386
None otherwise.
387387
"""
388388

389-
if self.stop_losses is not None or len(self.stop_losses) == 0:
389+
if self.stop_losses is None or len(self.stop_losses) == 0:
390390
return None
391391

392392
if self.stop_loss_rules_lookup == {}:

0 commit comments

Comments
 (0)