diff --git a/db.json b/db.json index e69de29..7a4d865 100644 --- a/db.json +++ b/db.json @@ -0,0 +1 @@ +{"_default": {"1": {"-Serial Number-": "1234", "Brand": "dell", "Grade": "7", "Name": "jb"}}} \ No newline at end of file diff --git a/main.py b/main.py index 3d89285..a89e483 100644 --- a/main.py +++ b/main.py @@ -55,8 +55,9 @@ def main(): if event == 'Add Computer': new_computer = add_computer() existing_table = window["table"].get() - existing_table+= list(new_computer.values()) + existing_table.append( list(new_computer.values())) window["table"].update(existing_table) + db.insert(new_computer) # Finish up by removing from the screen window.close()