Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #681 from theywa/fix-bug-680
Browse files Browse the repository at this point in the history
fixed: headless editing of records times out if autoqueries are added…
  • Loading branch information
kkrumlian authored Apr 20, 2023
2 parents b633f72 + 8380324 commit 368f3a2
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions public/js/src/module/controller-webform-oc.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,22 +380,15 @@ function init(formEl, data, loadErrors = []) {
console.log('doing headless things');
gui.prompt = () => Promise.resolve(true);
gui.confirm = () => Promise.resolve(true);
gui.confirmAutoQueries = () => Promise.resolve(true);

if (loadErrors.length) {
action = Promise.reject(new Error(loadErrors[0]));
} else if (settings.reasonForChange) {
if (!form.model.isMarkedComplete()) {
action = Promise.reject(
new Error(
'Attempt to load RFC view for non-completed record.'
)
);
} else {
action = _complete(true, {
autoQueries: true,
reasons: true,
});
}
action = _complete(true, {
autoQueries: true,
reasons: true,
});
} else {
action = _close({ autoQueries: true });
}
Expand Down

0 comments on commit 368f3a2

Please sign in to comment.