SHA256
forked from course-team/tjhlp-gitea
fix: 修复 settings.toml 中配置被 .secret.toml 整节覆盖的问题
This commit is contained in:
@@ -20,6 +20,7 @@ settings = Dynaconf(
|
|||||||
],
|
],
|
||||||
environments=True,
|
environments=True,
|
||||||
load_dotenv=True,
|
load_dotenv=True,
|
||||||
|
merge_enabled=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +90,9 @@ class Config(BaseModel):
|
|||||||
|
|
||||||
def get_config() -> Config:
|
def get_config() -> Config:
|
||||||
"""获取完整配置"""
|
"""获取完整配置"""
|
||||||
return Config.model_validate(settings.to_dict())
|
setting_dict = settings.to_dict()
|
||||||
|
print(setting_dict)
|
||||||
|
return Config.model_validate(setting_dict)
|
||||||
|
|
||||||
|
|
||||||
def get_gitea_config() -> GiteaConfig:
|
def get_gitea_config() -> GiteaConfig:
|
||||||
|
|||||||
Reference in New Issue
Block a user