mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(lint): clear the one-over LIT002 and inline-object budget hits
This commit is contained in:
parent
c6f724b56f
commit
ea99bd0585
2 changed files with 9 additions and 7 deletions
|
|
@ -84,11 +84,12 @@ async def screen_login_password_for_breach(
|
|||
return False
|
||||
breached: Final = await is_password_breached(password, general_settings, client)
|
||||
checked_at: Final = datetime.now(timezone.utc)
|
||||
update_data: Final[prisma_types.LiteLLM_UserTableUpdateInput] = (
|
||||
{"last_breach_check_at": checked_at, "password_reset_required": True}
|
||||
if breached
|
||||
else {"last_breach_check_at": checked_at}
|
||||
)
|
||||
breached_update: Final[prisma_types.LiteLLM_UserTableUpdateInput] = {
|
||||
"last_breach_check_at": checked_at,
|
||||
"password_reset_required": True,
|
||||
}
|
||||
recheck_update: Final[prisma_types.LiteLLM_UserTableUpdateInput] = {"last_breach_check_at": checked_at}
|
||||
update_data: Final = breached_update if breached else recheck_update
|
||||
find_user: Final[prisma_types.LiteLLM_UserTableWhereInput] = {"user_id": user_id}
|
||||
try:
|
||||
await UserRepository(prisma_client).table.update(where=find_user, data=update_data)
|
||||
|
|
|
|||
|
|
@ -131,12 +131,13 @@ describe("(dashboard) Layout", () => {
|
|||
});
|
||||
|
||||
it("routes a session flagged password_reset_required to the change-password page", async () => {
|
||||
document.cookie = `token=${sessionCookie({
|
||||
const flaggedClaims = {
|
||||
user_id: "flagged-user",
|
||||
key: "sk-session",
|
||||
login_method: "username_password",
|
||||
password_reset_required: true,
|
||||
})}; Path=/`;
|
||||
};
|
||||
document.cookie = `token=${sessionCookie(flaggedClaims)}; Path=/`;
|
||||
|
||||
render(
|
||||
<AuthProvider>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue