mirror of
https://github.com/meshtastic/python.git
synced 2026-07-31 09:06:28 -04:00
guard against None
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user