mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-10-26 19:01:43 -04:00
14 lines
418 B
Python
14 lines
418 B
Python
class InterfaceEditor:
|
|
|
|
@staticmethod
|
|
def update_value(interface_details: dict, data: dict, key: str):
|
|
|
|
# update value if provided and not empty
|
|
value = data.get(key)
|
|
if value is not None and value != "":
|
|
interface_details[key] = value
|
|
return
|
|
|
|
# otherwise remove existing value
|
|
if key in interface_details:
|
|
del interface_details[key]
|