Revert condition to exploit lazy evaluation

This commit is contained in:
Matthias 2022-03-23 19:41:57 +01:00
parent 7d02e81857
commit e545ac1978
1 changed files with 1 additions and 1 deletions

View File

@ -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)