fix: open connection before using it
This commit is contained in:
parent
73d5b1fd73
commit
f723459333
1 changed files with 2 additions and 1 deletions
|
|
@ -237,7 +237,8 @@ async def get_ratings_for_group(request: Request) -> JSONResponse:
|
||||||
|
|
||||||
ratings = [web_models.Rating(**r) for r in rows]
|
ratings = [web_models.Rating(**r) for r in rows]
|
||||||
|
|
||||||
awards = await db.get_awards(conn, imdb_ids=[r.movie_imdb_id for r in ratings])
|
async with db.new_connection() as conn:
|
||||||
|
awards = await db.get_awards(conn, imdb_ids=[r.movie_imdb_id for r in ratings])
|
||||||
|
|
||||||
aggrs = web_models.aggregate_ratings(ratings, user_ids, awards_dict=awards)
|
aggrs = web_models.aggregate_ratings(ratings, user_ids, awards_dict=awards)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue