Avoid mixed types in the api for /stats

This commit is contained in:
Matthias
2022-02-10 07:03:19 +01:00
parent af984bdc0d
commit be84a028c1
3 changed files with 6 additions and 6 deletions

View File

@@ -766,9 +766,9 @@ class Telegram(RPCHandler):
duration_msg = tabulate(
[
['Wins', str(timedelta(seconds=durations['wins']))
if durations['wins'] != 'N/A' else 'N/A'],
if durations['wins'] is not None else 'N/A'],
['Losses', str(timedelta(seconds=durations['losses']))
if durations['losses'] != 'N/A' else 'N/A']
if durations['losses'] is not None else 'N/A']
],
headers=['', 'Avg. Duration']
)