Skip to content

Commit af51ecf

Browse files
committed
Ensure functions are awaited
1 parent 767b14b commit af51ecf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/itn_api/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async def get_participants_counts_day(
171171
date_start: str = "1970-01-01", date_end: str = "1970-01-03"
172172
):
173173
"""Return participants in ITN."""
174-
report = reports.get_participants_counts_date_range(app, date_start, date_end)
174+
report = await reports.get_participants_counts_date_range(app, date_start, date_end)
175175
return report
176176

177177

@@ -183,7 +183,7 @@ async def get_participants_counts_day_csv(
183183
) -> str:
184184
"""Return participants in ITN."""
185185
logger.info("generating participant csv: get db data")
186-
report = reports.get_participants_counts_date_range(app, date_start, date_end)
186+
report = await reports.get_participants_counts_date_range(app, date_start, date_end)
187187
logger.info("data retrieved for participant csv: creating count csv")
188188
csv_report = reports.generate_participant_count_csv(report)
189189
return csv_report

0 commit comments

Comments
 (0)