Make test for None
explicit
Make test for `None` explicit
This commit is contained in:
parent
1d6738778b
commit
36f95fb35d
@ -2731,7 +2731,7 @@ class Exchange:
|
|||||||
pos = positions[0]
|
pos = positions[0]
|
||||||
isolated_liq = pos['liquidationPrice']
|
isolated_liq = pos['liquidationPrice']
|
||||||
|
|
||||||
if isolated_liq:
|
if isolated_liq is not None:
|
||||||
buffer_amount = abs(open_rate - isolated_liq) * self.liquidation_buffer
|
buffer_amount = abs(open_rate - isolated_liq) * self.liquidation_buffer
|
||||||
isolated_liq = (
|
isolated_liq = (
|
||||||
isolated_liq - buffer_amount
|
isolated_liq - buffer_amount
|
||||||
|
Loading…
Reference in New Issue
Block a user