guard against None

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Ian McEwen
2026-07-01 15:21:25 -07:00
committed by GitHub
parent b6a13d58fe
commit b05e545396

View File

@@ -1347,6 +1347,8 @@ def export_config(interface) -> str:
return config_txt
def _set_if_populated(profile, field_name, value):
if value is None:
return
val = str(value).strip()
if val:
setattr(profile, field_name, val)