enabled it to remove things
All checks were successful
Potlatch Loggers Organization/ComputerKeeper/pipeline/head This commit looks good

This commit is contained in:
Josh Biltonen 2022-09-25 19:15:15 -07:00
parent da8432d465
commit 801d3b4b1d
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
{"_default": {"1": {"Serial Number": "123", "Brand": "d", "Grade": "7", "Name": "jb"}, "2": {"Serial Number": "1", "Brand": "2", "Grade": "3", "Name": "4"}, "3": {"Serial Number": "4321", "Brand": "d", "Grade": "12", "Name": "qb"}}}
{"_default": {"1": {"Serial Number": "123", "Brand": "d", "Grade": "7", "Name": "jb"}, "2": {"Serial Number": "1", "Brand": "2", "Grade": "3", "Name": "4"}}}

View File

@ -69,7 +69,9 @@ def main():
elif event == 'Remove Computer':
if values["table"]:
existing_table = window["table"].get()
existing_table.pop(values["table"][0])
serial = existing_table.pop(values["table"][0])[0]
query = Query()
db.remove(query["Serial Number"] == serial)
window["table"].update(existing_table)
# Finish up by removing from the screen