diff --git a/nomen/utils.py b/nomen/utils.py index 7186c19..3b9861e 100644 --- a/nomen/utils.py +++ b/nomen/utils.py @@ -112,8 +112,8 @@ def unpack(lst_of_tpl): async def fetch_unpacked(db, sql, params=None): - cur = db.cursor() - cur.row_factory = first + cur = await db.cursor() + cur.row_factory = lambda cursor, row: first(row) cur = await cur.execute(sql, params) return await cur.fetchall()