Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
6be11db0
Commit
6be11db0
authored
Oct 02, 2019
by
Samuel GAIST
Browse files
[widgets][databaseeditor] Make resistant to "empty" JSON
Empty as in "{}"
parent
8ce35c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/widgets/databaseeditor.py
View file @
6be11db0
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment