Commit 6be11db0 authored by Samuel GAIST's avatar Samuel GAIST

[widgets][databaseeditor] Make resistant to "empty" JSON

Empty as in "{}"
parent 8ce35c44
......@@ -160,7 +160,7 @@ class DatabaseV1Viewer(QWidget):
def load(self, json_object):
self.scroll_widget.clear()
for protocol in json_object["protocols"]:
for protocol in json_object.get("protocols", []):
protocol_viewer = ProtocolViewer()
protocol_viewer.load(protocol)
self.scroll_widget.addWidget(protocol_viewer)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment