Revert condition to exploit lazy evaluation
This commit is contained in:
parent
7d02e81857
commit
e545ac1978
@ -718,7 +718,7 @@ class LocalTrade():
|
||||
|
||||
zero = Decimal(0.0)
|
||||
# If nothing was borrowed
|
||||
if self.has_no_leverage or self.trading_mode != TradingMode.MARGIN:
|
||||
if self.trading_mode != TradingMode.MARGIN or self.has_no_leverage:
|
||||
return zero
|
||||
|
||||
open_date = self.open_date.replace(tzinfo=None)
|
||||
|
Loading…
Reference in New Issue
Block a user