Merge pull request #5605 from peterwilli/fix-sell-cancel-webhook-error

fixed webhook "unsupported format string passed to NoneType." error
This commit is contained in:
Matthias 2021-09-23 20:17:35 +02:00 committed by GitHub
commit 9a6d8977de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1217,7 +1217,7 @@ class FreqtradeBot(LoggingMixin):
'exchange': trade.exchange.capitalize(), 'exchange': trade.exchange.capitalize(),
'pair': trade.pair, 'pair': trade.pair,
'gain': gain, 'gain': gain,
'limit': profit_rate, 'limit': profit_rate or 0,
'order_type': order_type, 'order_type': order_type,
'amount': trade.amount, 'amount': trade.amount,
'open_rate': trade.open_rate, 'open_rate': trade.open_rate,
@ -1226,7 +1226,7 @@ class FreqtradeBot(LoggingMixin):
'profit_ratio': profit_ratio, 'profit_ratio': profit_ratio,
'sell_reason': trade.sell_reason, 'sell_reason': trade.sell_reason,
'open_date': trade.open_date, 'open_date': trade.open_date,
'close_date': trade.close_date, 'close_date': trade.close_date or datetime.now(timezone.utc),
'stake_currency': self.config['stake_currency'], 'stake_currency': self.config['stake_currency'],
'fiat_currency': self.config.get('fiat_display_currency', None), 'fiat_currency': self.config.get('fiat_display_currency', None),
'reason': reason, 'reason': reason,