Skip to content

Commit f04b61f

Browse files
committed
Merge branch '2.0.x' into 2.1.x
2 parents 569e0ea + bf3d1bb commit f04b61f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [2.0.1](https://github.com/ReliefApplications/oort-backend/compare/v2.0.0...v2.0.1) (2023-07-07)
2+
3+
4+
### Bug Fixes
5+
6+
* choicesByUrl could break checkRecordValidation method ([98c15bd](https://github.com/ReliefApplications/oort-backend/commit/98c15bd836f1f3d31f0f0711b6c320cca2447bb3))
7+
18
# [2.0.0](https://github.com/ReliefApplications/oort-backend/compare/v1.3.17...v2.0.0) (2023-07-03)
29

310

src/utils/form/checkRecordValidation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ export const checkRecordValidation = (
3737
lang = 'en'
3838
): { question: string; errors: string[] }[] => {
3939
// Necessary to fix 401 errors if we have choicesByUrl targeting self API.
40-
passTokenForChoicesByUrl(context);
40+
// passTokenForChoicesByUrl(context);
41+
// Avoid the choices by url to be called, as it could freeze system depending on the choices
42+
(Survey.ChoicesRestful as any).getCachedItemsResult = () => true;
4143
// create the form
4244
const survey = new Survey.Model(form.structure);
4345
const structure = JSON.parse(form.structure);
46+
// Run completion
4447
const onCompleteExpression = survey.toJSON().onCompleteExpression;
4548
if (onCompleteExpression) {
4649
survey.onCompleting.add(() => {

0 commit comments

Comments
 (0)