Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
4c75db50
Commit
4c75db50
authored
3 years ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Make sure to pop internal disable-correct key from data mapping
parent
955e86ac
No related branches found
No related tags found
1 merge request
!629
Pop internal disable-correct key from data mapping
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webservice/webservice.py
+7
-1
7 additions, 1 deletion
webservice/webservice.py
with
7 additions
and
1 deletion
webservice/webservice.py
+
7
−
1
View file @
4c75db50
...
@@ -910,7 +910,7 @@ class ActionsServer:
...
@@ -910,7 +910,7 @@ class ActionsServer:
for
karabo_id
in
pconf
:
for
karabo_id
in
pconf
:
dconfig
=
data_conf
[
karabo_id
]
dconfig
=
data_conf
[
karabo_id
]
if
dconfig
.
get
(
'
disable-correct
'
,
False
):
if
dconfig
.
pop
(
'
disable-correct
'
,
False
):
# Skip this detector installation for
# Skip this detector installation for
# corrections if disabled.
# corrections if disabled.
continue
continue
...
@@ -1036,6 +1036,9 @@ class ActionsServer:
...
@@ -1036,6 +1036,9 @@ class ActionsServer:
triple
=
any
(
det
in
karabo_id
for
det
in
triple
=
any
(
det
in
karabo_id
for
det
in
[
"
LPD
"
,
"
AGIPD
"
,
"
JUNGFRAU
"
,
"
JF
"
,
"
JNGFR
"
])
[
"
LPD
"
,
"
AGIPD
"
,
"
JUNGFRAU
"
,
"
JF
"
,
"
JNGFR
"
])
# This fails silently if the hardcoded strings above are
# ever changed (triple = False) but the underlying notebook
# still expects run-high/run-med/run-low.
if
triple
and
len
(
runs
)
==
1
:
if
triple
and
len
(
runs
)
==
1
:
runs_dict
=
{
'
run-high
'
:
runs
[
0
],
runs_dict
=
{
'
run-high
'
:
runs
[
0
],
'
run-med
'
:
'
0
'
,
'
run-med
'
:
'
0
'
,
...
@@ -1051,6 +1054,9 @@ class ActionsServer:
...
@@ -1051,6 +1054,9 @@ class ActionsServer:
# is not migrated, thus skipping some validation here.
# is not migrated, thus skipping some validation here.
thisconf
=
copy
.
copy
(
data_conf
[
karabo_id
])
thisconf
=
copy
.
copy
(
data_conf
[
karabo_id
])
# Pop internal key to avoid propagation to xfel-calibrate.
thisconf
.
pop
(
'
disable-correct
'
,
None
)
if
(
karabo_id
in
pconf
if
(
karabo_id
in
pconf
and
isinstance
(
pconf
[
karabo_id
],
dict
)):
and
isinstance
(
pconf
[
karabo_id
],
dict
)):
thisconf
.
update
(
copy
.
copy
(
pconf
[
karabo_id
]))
thisconf
.
update
(
copy
.
copy
(
pconf
[
karabo_id
]))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment