update python version and modules

This commit is contained in:
jomo 2024-02-01 01:04:20 +01:00
parent 621db6ad2c
commit 6d01523d8d
3 changed files with 5 additions and 5 deletions

View file

@ -37,7 +37,7 @@ def _set_sqlite_pragma(conn, _):
async def list_items(db: Session = Depends(get_db)):
# natural sort by id
natsort = lambda item: [
int(t) if t.isdigit() else t.lower() for t in re.split("(\d+)", item.id)
int(t) if t.isdigit() else t.lower() for t in re.split(r"(\d+)", item.id)
]
items = crud.get_items(db)
items = sorted(items, key=natsort)