mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-09-19 03:09:56 +00:00
fix: ty warning
This commit is contained in:
@@ -270,7 +270,9 @@ class AsyncCrud(Generic[ModelType]):
|
|||||||
return cls.default_load_options
|
return cls.default_load_options
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _capture_pk_values(cls: type[Self], instance: ModelType) -> dict[str, Any]:
|
def _capture_pk_values(
|
||||||
|
cls: type[Self], instance: DeclarativeBase
|
||||||
|
) -> dict[str, Any]:
|
||||||
"""Capture PK values off instance — call before commit expires attributes."""
|
"""Capture PK values off instance — call before commit expires attributes."""
|
||||||
return {
|
return {
|
||||||
cast(str, col.key): getattr(instance, cast(str, col.key))
|
cast(str, col.key): getattr(instance, cast(str, col.key))
|
||||||
|
|||||||
Reference in New Issue
Block a user