Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit fec938f

Browse files
author
pmandrik
committed
manually_update_a_run_reset_rr_attributes fixes
1 parent c799029 commit fec938f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

runregistry_backend/cron/2.save_or_update_runs.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ exports.manually_update_a_run_reset_rr_attributes = async (
276276
) => {
277277
// get rr_attributes:
278278
const { data: saved_run } = await axios.get(`${API_URL}/runs/${run_number}`);
279-
const previous_rr_attributes = None;
280-
279+
const previous_rr_attributes = saved_run.rr_attributes;
281280
if (previous_rr_attributes.state !== 'OPEN') {
282281
throw 'Run must be in state OPEN to be refreshed';
283282
}
283+
284284
// get oms_attributes:
285285
const endpoint = `${OMS_URL}/${OMS_SPECIFIC_RUN(run_number)}`;
286286
const {
@@ -290,9 +290,10 @@ exports.manually_update_a_run_reset_rr_attributes = async (
290290
Authorization: `Bearer ${await getToken()}`,
291291
},
292292
});
293+
const empty_var = false;
293294
const run_oms_attributes = fetched_run[0].attributes;
294295
await exports.update_runs([run_oms_attributes], 0, {
295-
previous_rr_attributes,
296+
empty_var,
296297
email,
297298
comment,
298299
manually_significant,

runregistry_frontend/components/online/manage_run/manageRun/editRunLumisections/EditRunLumisections.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ const mapStateToProps = (state) => {
233233

234234
export default connect(mapStateToProps, {
235235
refreshRun,
236+
resetAndRefreshRun,
236237
showManageRunModal,
237238
addLumisectionRange,
238239
})(EditRunLumisections);

0 commit comments

Comments
 (0)