diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6ea411be..4055eb3ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - types-requests==2.31.0.20240106 - types-tabulate==0.9.0.20240106 - types-python-dateutil==2.8.19.20240106 - - SQLAlchemy==2.0.23 + - SQLAlchemy==2.0.25 # stages: [push] - repo: https://github.com/pycqa/isort diff --git a/freqtrade/persistence/trade_model.py b/freqtrade/persistence/trade_model.py index 42004867d..02a06e8e5 100644 --- a/freqtrade/persistence/trade_model.py +++ b/freqtrade/persistence/trade_model.py @@ -1637,7 +1637,7 @@ class Trade(ModelBase, LocalTrade): Retrieves total realized profit """ if Trade.use_db: - total_profit: float = Trade.session.execute( + total_profit = Trade.session.execute( select(func.sum(Trade.close_profit_abs)).filter(Trade.is_open.is_(False)) ).scalar_one() else: @@ -1845,4 +1845,4 @@ class Trade(ModelBase, LocalTrade): Order.order_filled_date >= start_date, Order.status == 'closed' )).scalar_one() - return trading_volume + return trading_volume or 0.0 diff --git a/requirements.txt b/requirements.txt index da17047ea..9b8f9cb2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ pandas-ta==0.3.14b ccxt==4.2.9 cryptography==41.0.7 aiohttp==3.9.1 -SQLAlchemy==2.0.23 +SQLAlchemy==2.0.25 python-telegram-bot==20.7 # can't be hard-pinned due to telegram-bot pinning httpx with ~ httpx>=0.24.1