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])