Skip to content

Commit 436e4e0

Browse files
Passing function reference to lambda
1 parent 8aee1c8 commit 436e4e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/routers/customer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ def to_customer(row) -> Customer:
1313
@router.get("/customers/", tags=["users"])
1414
async def read_customers() -> list[Customer]:
1515
rows = await database.fetch_all(query="select * from customers")
16-
customers: list[Customer] = list(map(lambda row: to_customer(row), rows))
16+
customers: list[Customer] = list(map(to_customer, rows))
1717
return customers

0 commit comments

Comments
 (0)