Skip to content

Commit e13d120

Browse files
disruptedtiangolo
andauthored
✏ Fix typo in variable names in backend/app/api/routes/items.py and backend/app/api/routes/users.py (#711)
Co-authored-by: Sebastián Ramírez <[email protected]>
1 parent afc55bd commit e13d120

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

backend/app/api/routes/items.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ def read_items(
1818
"""
1919

2020
if current_user.is_superuser:
21-
statment = select(func.count()).select_from(Item)
22-
count = session.exec(statment).one()
21+
count_statement = select(func.count()).select_from(Item)
22+
count = session.exec(count_statement).one()
2323
statement = select(Item).offset(skip).limit(limit)
2424
items = session.exec(statement).all()
2525
else:
26-
statment = (
26+
count_statement = (
2727
select(func.count())
2828
.select_from(Item)
2929
.where(Item.owner_id == current_user.id)
3030
)
31-
count = session.exec(statment).one()
31+
count = session.exec(count_statement).one()
3232
statement = (
3333
select(Item)
3434
.where(Item.owner_id == current_user.id)

backend/app/api/routes/users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def read_users(session: SessionDep, skip: int = 0, limit: int = 100) -> Any:
3636
Retrieve users.
3737
"""
3838

39-
statment = select(func.count()).select_from(User)
40-
count = session.exec(statment).one()
39+
count_statement = select(func.count()).select_from(User)
40+
count = session.exec(count_statement).one()
4141

4242
statement = select(User).offset(skip).limit(limit)
4343
users = session.exec(statement).all()

0 commit comments

Comments
 (0)