make "/profit N" command output be consistent with "/daily" and "/status table" commands

This commit is contained in:
Eugene Schava 2021-06-22 12:22:19 +03:00
parent 0605cbb06e
commit e97c82c514
1 changed files with 2 additions and 3 deletions

View File

@ -339,9 +339,8 @@ class RPC:
self, stake_currency: str, fiat_display_currency: str,
start_date: datetime = datetime.fromtimestamp(0)) -> Dict[str, Any]:
""" Returns cumulative profit statistics """
trade_filter = \
(Trade.is_open.is_(False) & (Trade.close_date >= start_date)) | \
Trade.is_open.is_(True)
trade_filter = ((Trade.is_open.is_(False) & (Trade.close_date >= start_date)) |
Trade.is_open.is_(True))
trades = Trade.get_trades(trade_filter).order_by(Trade.id).all()
profit_all_coin = []