Fixed index error
This commit is contained in:
parent
3af683acf5
commit
319566ab0f
2
db.json
2
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"}}}
|
{"_default": {}}
|
2
main.py
2
main.py
@ -122,7 +122,7 @@ def main():
|
|||||||
)
|
)
|
||||||
window["table"].update(format_table(result))
|
window["table"].update(format_table(result))
|
||||||
|
|
||||||
elif event == "table":
|
elif event == "table" and values["table"]:
|
||||||
row=window["table"].get()[values["table"][0]]
|
row=window["table"].get()[values["table"][0]]
|
||||||
window["Serial Number"].update(row[0])
|
window["Serial Number"].update(row[0])
|
||||||
window["Brand"].update(row[1])
|
window["Brand"].update(row[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user