chore: enhance saving config file with non-ASCII

This commit is contained in:
zthxxx
2023-06-03 22:21:00 +08:00
parent 4ce8c1eb40
commit 300e7488b4

View File

@@ -42,7 +42,7 @@ class Settings(Config):
if not config_dict:
config_dict = self.dict()
with open(CONFIG_PATH, "w", encoding="utf-8") as f:
json.dump(config_dict, f, indent=4)
json.dump(config_dict, f, indent=4, ensure_ascii=False)
def init(self):
load_dotenv(".env")