Skip to content

Commit

Permalink
Fix seats incremental result code
Browse files Browse the repository at this point in the history
  • Loading branch information
chamil321 committed Aug 5, 2020
1 parent e80aab0 commit d2847a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions distributor/src/distributor/constants.bal
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ const RN_VSN = "RN_VSN";
const RE_SC = "RE_SC";
const RN_NC = "RN_NC";
const RN_SCNC = "RN_SCNC";

const FINAL = "FINAL";
4 changes: 2 additions & 2 deletions distributor/src/distributor/results.bal
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function sendParliamentaryIncrementalResult(CumulativeResult resCumResult, strin
return sendParliamentaryIncrementalVotesResult(resCumResult, electionCode, RE_VI, resultCode, result);
}

return sendParliamentaryIncrementalSeatsResult(resCumResult, electionCode, RN_SI, resultCode, result);
return sendParliamentaryIncrementalSeatsResult(resCumResult, electionCode, RN_SI, FINAL, result);
}

function sendParliamentaryIncrementalVotesResult(CumulativeResult resCumResult, string electionCode, string resultType,
Expand Down Expand Up @@ -347,7 +347,7 @@ function sendParliamentaryIncrementalSeatsResult(CumulativeResult resCumResult,
sequenceNo: -1, // wil be updated with DB sequence # upon storage
election: result.election,
'type: resultType,
code: result.code,
code: resultCode,
jsonResult: cumJsonResult,
imageMediaType: (),
imageData: ()
Expand Down
2 changes: 1 addition & 1 deletion testdriver/src/testdriver/gen_fake_parliamentary.bal
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function genFakeParliamentary() {
"level": "POLLING-DIVISION",
"ed_code": "01",
"ed_name": "Colombo",
"pd_code": "PV",
"pd_code": "01PV",
"pd_name": "Postal Votes",
"by_party": [
{
Expand Down

0 comments on commit d2847a4

Please sign in to comment.