From 319566ab0f1c9a962af413a24c64fae89f1e5b87 Mon Sep 17 00:00:00 2001 From: Josh b Date: Thu, 10 Nov 2022 17:41:27 -0800 Subject: [PATCH] Fixed index error --- db.json | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db.json b/db.json index 1fa0494..e9b1817 100644 --- a/db.json +++ b/db.json @@ -1 +1 @@ -{"_default": {"1": {"Serial Number": "123", "Brand": "d", "Grade": "7", "Name": "jb"}, "2": {"Serial Number": "1", "Brand": "2", "Grade": "3", "Name": "4"}}} \ No newline at end of file +{"_default": {}} \ No newline at end of file diff --git a/main.py b/main.py index e52e240..ad11387 100644 --- a/main.py +++ b/main.py @@ -122,7 +122,7 @@ def main(): ) window["table"].update(format_table(result)) - elif event == "table": + elif event == "table" and values["table"]: row=window["table"].get()[values["table"][0]] window["Serial Number"].update(row[0]) window["Brand"].update(row[1])