Skip to content

Commit

Permalink
Ensure data is converted to dict
Browse files Browse the repository at this point in the history
This makes sure we can check foro null.
ross-spencer committed Nov 19, 2024
1 parent 5595b66 commit cbc735e
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/itn_api/api.py
Original file line number Diff line number Diff line change
@@ -218,6 +218,7 @@ async def get_online_collectors() -> str:
)
except apsw.SQLError:
return "zero collectors online"
participants_count_total = dict(participants_count_total)
htmx = htm_helpers.participants_count_table(participants_count_total)
return htmx.strip()

2 changes: 1 addition & 1 deletion src/itn_api/htm_helpers.py
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ def participants_count_table(participants_count_total):
""".strip()

rows = ""
for stake_key, count in participants_count_total:
for stake_key, count in participants_count_total.items():
row = f"""
<tr>
<td>{stake_key}</td>

0 comments on commit cbc735e

Please sign in to comment.