()
| 30 | |
| 31 | |
| 32 | async def ensure_settings_row() -> None: |
| 33 | initial_security = prepare_security_config(DEFAULT_CONFIG) |
| 34 | _, created = await KeyValue.get_or_create( |
| 35 | key="settings", defaults={"value": initial_security.config} |
| 36 | ) |
| 37 | if created: |
| 38 | logger.warning( |
| 39 | "系统尚未初始化,请在浏览器中打开站点并完成管理员密码设置" |
| 40 | ) |
| 41 | |
| 42 | |
| 43 | async def ensure_security_settings() -> None: |
no test coverage detected