Skip to content

Commit

Permalink
Indicate winner when market is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
mberk committed Feb 1, 2022
1 parent 4714c83 commit f71f49f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions betfairviz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5272,12 +5272,13 @@ def _create_market_book_table(
<table class="mv-runner-list">
"""
for runner in market_book['marketDefinition']['runners']:
is_non_runner = runner['status'] == 'REMOVED'
tokens = [str(runner['id'])]
if show_runner_names and 'name' in runner:
tokens.append(runner['name'])
if is_non_runner:
if runner['status'] == 'REMOVED':
tokens.append('Non Runner')
elif runner['status'] == 'WINNER':
tokens.append('Winner')
runner_name = ' - '.join(tokens)
html += ''
html += f"""
Expand Down

0 comments on commit f71f49f

Please sign in to comment.