We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96c3b5a commit 909ac9cCopy full SHA for 909ac9c
distributor/src/distributor/website.bal
@@ -122,8 +122,9 @@ service mediaWebsite on mediaListener {
122
return caller->ok(r.jsonResult);
123
} else if format == "html" {
124
http:Response hr = new;
125
- boolean sorted = (r.jsonResult.'type == RN_SI || r.jsonResult.'type == RN_V ||
126
- r.jsonResult.'type == RN_VS || r.jsonResult.'type == RN_VSN) ? true : false;
+ string resultType = r.jsonResult.'type.toString();
+ boolean sorted = (resultType == RN_SI || resultType == RN_V || resultType == RN_VS ||
127
+ resultType == RN_VSN) ? true : false;
128
hr.setTextPayload(<@untainted>check generateHtml(election, r.jsonResult, sorted));
129
hr.setContentType("text/html");
130
return caller->ok(hr);
0 commit comments