There was an error while loading. Please reload this page.
1 parent cc10e7d commit 9b3d02fCopy full SHA for 9b3d02f
1 file changed
src/pyfly/data/relational/sqlalchemy/repository.py
@@ -80,6 +80,8 @@ def _pk_column(self) -> Any:
80
from sqlalchemy import inspect as sa_inspect
81
82
mapper = sa_inspect(self._model)
83
+ if mapper is None:
84
+ return self._model.id # type: ignore[attr-defined]
85
pk_cols = mapper.primary_key
86
if pk_cols:
87
return getattr(self._model, pk_cols[0].name)
0 commit comments