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
8ce35c44
Commit
8ce35c44
authored
Oct 02, 2019
by
Samuel GAIST
Browse files
[widgets][algorithmeditor] Make resistant to "empty" JSON
Empty as in "{}"
parent
d882e95a
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/widgets/algorithmeditor.py
View file @
8ce35c44
...
...
@@ -283,7 +283,7 @@ class PropertyEditor(QWidget):
def
load
(
self
,
json_object
):
self
.
schema_version
=
json_object
.
get
(
"schema_version"
)
self
.
api_version
=
json_object
.
get
(
"api_version"
)
self
.
language
=
json_object
[
"language"
]
self
.
language
=
json_object
.
get
(
"language"
)
self
.
analyzer_checkbox
.
setChecked
(
"results"
in
json_object
)
algorithm_type
=
json_object
.
get
(
"type"
,
"legacy"
)
for
button
in
self
.
button_group
.
buttons
():
...
...
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