mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
domain: reset portal_logo value even if file has already been removed
This commit is contained in:
parent
d28b6e96c8
commit
45b36dae05
1 changed files with 3 additions and 2 deletions
|
@ -781,11 +781,12 @@ class DomainConfigPanel(ConfigPanel):
|
|||
if previous_settings.get("portal_logo"):
|
||||
try:
|
||||
os.remove(previous_settings["portal_logo"])
|
||||
portal_values["portal_logo"] = ''
|
||||
except:
|
||||
except FileNotFoundError:
|
||||
logger.warning(
|
||||
f"Coulnd't remove previous logo file, maybe the file was already deleted, path: {previous_settings['portal_logo']}"
|
||||
)
|
||||
finally:
|
||||
portal_values["portal_logo"] = ""
|
||||
|
||||
if next_settings["portal_logo"]:
|
||||
# Save the file content as `{mimetype}:{base64content}` in portal settings
|
||||
|
|
Loading…
Add table
Reference in a new issue