mirror of
https://gitlab.aachen.ccc.de/inventory/in.git
synced 2025-06-08 21:15:09 +02:00
fix natural sorting
This commit is contained in:
parent
c2133771eb
commit
93d6063c52
2 changed files with 5 additions and 1 deletions
2
crud.py
2
crud.py
|
@ -4,7 +4,7 @@ from sqlalchemy import DECIMAL, cast
|
|||
import models, schemas
|
||||
|
||||
def get_items(db: Session) -> list[models.Item]:
|
||||
return db.query(models.Item).order_by(models.Item.type, cast(models.Item.id, DECIMAL))
|
||||
return db.query(models.Item).all()
|
||||
|
||||
|
||||
def put_item(db: Session, id: str, item: schemas.Item):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue