Skip to content

Commit

Permalink
frontend code fix - fix get EMPRO get triggers ajax call
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen committed Apr 19, 2024
1 parent 3e606dd commit 70ec17a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portal/static/js/src/modules/TnthAjax.js
Expand Up @@ -4,7 +4,7 @@ import tnthDates from "./TnthDate.js";
import SYSTEM_IDENTIFIER_ENUM from "./SYSTEM_IDENTIFIER_ENUM.js";
import CLINICAL_CODE_ENUM from "./CLINICAL_CODE_ENUM.js";
import Consent from "./Consent.js";
import {DEFAULT_SERVER_DATA_ERROR, EPROMS_MAIN_STUDY_ID, EMPRO_TRIGGER_IN_PROCESS_STATE} from "../data/common/consts.js";
import {DEFAULT_SERVER_DATA_ERROR, EPROMS_MAIN_STUDY_ID, EMPRO_TRIGGER_UNPROCCESSED_STATES} from "../data/common/consts.js";
const MAX_ATTEMPTS = 3
export default { /*global $ */
"beforeSend": function() {
Expand Down Expand Up @@ -367,7 +367,7 @@ export default { /*global $ */

//if the trigger data has not been processed, try again until maximum number of attempts has been reached
if (params.retryAttempt < params.maxTryAttempts &&
dataState === EMPRO_TRIGGER_IN_PROCESS_STATE) {
EMPRO_TRIGGER_UNPROCCESSED_STATES.indexOf(dataState) !== -1) {
params.retryAttempt++;
setTimeout(function() {
this.getSubStudyTriggers(userId, params, callback);
Expand Down

0 comments on commit 70ec17a

Please sign in to comment.