Skip to content

Commit

Permalink
#52 Fix treatment of text fields with a default value of None (broke …
Browse files Browse the repository at this point in the history
…during unification of args and conf specs).
  • Loading branch information
digitaltrails committed Aug 10, 2023
1 parent a4c95e8 commit ed17fbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vdu_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,8 +1697,9 @@ def __init__(self, config_name: str, default_enabled_vcp_codes: List | None = No
if include_globals:
self.ini_content[QT_TR_NOOP('vdu-controls-globals')] = {}
for option in ConfOption:
if option.conf_section == 'vdu-controls-globals': # and option.default_value is not None:
self.ini_content[option.conf_section][option.conf_name] = str(option.default_value)
if option.conf_section == 'vdu-controls-globals':
default_str = str(option.default_value) if option.default_value is not None else ''
self.ini_content[option.conf_section][option.conf_name] = default_str

self.ini_content[QT_TR_NOOP('vdu-controls-widgets')] = {}
self.ini_content[QT_TR_NOOP('ddcutil-parameters')] = {}
Expand Down

0 comments on commit ed17fbb

Please sign in to comment.