Skip to content

Commit b1be263

Browse files
committed
feat: set SelectOfScalar.inherit_cache = True
1 parent 9d1b1fb commit b1be263

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fastapi_user_auth/auth/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from sqlmodel.ext.asyncio.session import AsyncSession
99
from sqlmodel.sql.expression import SelectOfScalar
1010

11+
SelectOfScalar.inherit_cache = True
12+
1113

1214
class SQLModelTable(SQLModel):
1315
id: int = Field(default=None, primary_key=True, nullable=False)
@@ -59,9 +61,11 @@ class UserUsername(SQLModel):
5961
sa_column=Column(String(32), unique=True, index=True, nullable=False)
6062
)
6163

62-
class PasswordStr(SecretStr,str):
64+
65+
class PasswordStr(SecretStr, str):
6366
pass
6467

68+
6569
class UserPassword(SQLModel):
6670
password: PasswordStr = Field(
6771
title='密码', max_length=128,

0 commit comments

Comments
 (0)