✏ 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 <tiangolo@gmail.com>
This commit is contained in:
Salomon Popp
2024-03-13 18:06:22 +00:00
committed by GitHub
parent afc55bdf91
commit e13d120fd1
2 changed files with 6 additions and 6 deletions

View File

@@ -18,17 +18,17 @@ def read_items(
"""
if current_user.is_superuser:
statment = select(func.count()).select_from(Item)
count = session.exec(statment).one()
count_statement = select(func.count()).select_from(Item)
count = session.exec(count_statement).one()
statement = select(Item).offset(skip).limit(limit)
items = session.exec(statement).all()
else:
statment = (
count_statement = (
select(func.count())
.select_from(Item)
.where(Item.owner_id == current_user.id)
)
count = session.exec(statment).one()
count = session.exec(count_statement).one()
statement = (
select(Item)
.where(Item.owner_id == current_user.id)