mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-08-04 15:44:09 +00:00
fix: ty warning
This commit is contained in:
@@ -193,7 +193,7 @@ async def _batch_reload(
|
|||||||
session: AsyncSession, model: type, pk_tuples: list[tuple[Any, ...]]
|
session: AsyncSession, model: type, pk_tuples: list[tuple[Any, ...]]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Re-populate all rows of *model* identified by *pk_tuples* in one round trip."""
|
"""Re-populate all rows of *model* identified by *pk_tuples* in one round trip."""
|
||||||
pk_cols = sa_inspect(model).primary_key
|
pk_cols = sa_inspect(model, raiseerr=True).primary_key
|
||||||
where = (
|
where = (
|
||||||
pk_cols[0].in_([pk[0] for pk in pk_tuples])
|
pk_cols[0].in_([pk[0] for pk in pk_tuples])
|
||||||
if len(pk_cols) == 1
|
if len(pk_cols) == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user