Skip to content

Commit

Permalink
fixed bug with utilizing arbitrary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
natankeddem committed May 2, 2024
1 parent db3ed86 commit 9cbfb0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autopve/tabs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def add_key(key, value=""):
"control": el.FInput(
key,
password=True if key == "root_password" else False,
autocomplete=keys[key]["options"] if "options" in keys[key] else None,
autocomplete=keys[key]["options"] if key in keys and "options" in keys[key] else None,
on_change=lambda e, key=key: set_key(key, e.value),
),
"row": key_row,
Expand All @@ -78,7 +78,7 @@ def remove_key(key):

def set_key(key, value: str):
if len(value) > 0:
if "type" in keys[key]:
if key in keys and "type" in keys[key]:
if keys[key]["type"] == "list":
self.picked_keys[key] = value[1:-1].split(",")
elif keys[key]["type"] == "int":
Expand Down

0 comments on commit 9cbfb0f

Please sign in to comment.