mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-21 16:28:17 +00:00
Fix: [ALAS] Deploy config wasn't redirected after Updater.delay()
This commit is contained in:
parent
a8e2dab328
commit
eb7086e809
@ -80,12 +80,6 @@ class DeployConfig(ConfigModel):
|
||||
self.config_template = {}
|
||||
self.read()
|
||||
|
||||
# Bypass webui.config.DeployConfig.__setattr__()
|
||||
# Don't write these into deploy.yaml
|
||||
super().__setattr__('GitOverCdn', self.Repository in ['cn'])
|
||||
if self.Repository in ['global', 'cn']:
|
||||
super().__setattr__('Repository', 'https://github.com/LmeSzinc/StarRailCopilot')
|
||||
|
||||
self.write()
|
||||
self.show_config()
|
||||
|
||||
@ -109,9 +103,21 @@ class DeployConfig(ConfigModel):
|
||||
if hasattr(self, key):
|
||||
super().__setattr__(key, value)
|
||||
|
||||
self.config_redirect()
|
||||
|
||||
def write(self):
|
||||
poor_yaml_write(self.config, self.file)
|
||||
|
||||
def config_redirect(self):
|
||||
"""
|
||||
Redirect deploy config, must be called after each `read()`
|
||||
"""
|
||||
# Bypass webui.config.DeployConfig.__setattr__()
|
||||
# Don't write these into deploy.yaml
|
||||
super().__setattr__('GitOverCdn', self.Repository in ['cn'])
|
||||
if self.Repository in ['global', 'cn']:
|
||||
super().__setattr__('Repository', 'https://github.com/LmeSzinc/StarRailCopilot')
|
||||
|
||||
def filepath(self, path):
|
||||
"""
|
||||
Args:
|
||||
|
@ -37,6 +37,8 @@ class DeployConfig(_DeployConfig):
|
||||
if hasattr(self, key):
|
||||
super().__setattr__(key, value)
|
||||
|
||||
self.config_redirect()
|
||||
|
||||
def write(self):
|
||||
"""
|
||||
Write `self.config` into deploy config.
|
||||
|
Loading…
Reference in New Issue
Block a user