Skip to content

Commit 147b131

Browse files
committed
fix: default factory for background flag
1 parent ff77ddd commit 147b131

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/api/init/init_request.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@functools.cache
2222
def is_login_background_enabled() -> bool:
23-
img_path = f"/mnt/{nebula.config.site_name}_01/.nx/login_background.jpg"
23+
img_path = f"/mnt/{nebula.config.site_name}_01/.nx/login-background.jpg"
2424
return os.path.isfile(img_path)
2525

2626

@@ -46,8 +46,9 @@ class InitResponseModel(ResponseModel):
4646
Field(
4747
title="Background",
4848
description="Is the login background image enabled?",
49+
default_factory=is_login_background_enabled,
4950
),
50-
] = True
51+
]
5152

5253
user: Annotated[
5354
UserModel | None,

0 commit comments

Comments
 (0)