Skip to content

Commit

Permalink
Fix for the case when Category is not specified. Issue #2302, PR #2578
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Mendioroz committed Oct 14, 2017
1 parent ed20580 commit b421efc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ public void init() {
protected Response getUsage(final String accountSid, final String subresource, UriInfo info, final MediaType responseType) {
secure(accountsDao.getAccount(accountSid), "RestComm:Read:Usage");

String categoryStr = info.getQueryParameters().getFirst("Category").toUpperCase();
String categoryStr = info.getQueryParameters().getFirst("Category");
if (categoryStr != null) {
categoryStr = categoryStr.toUpperCase();
}
String startDateStr = info.getQueryParameters().getFirst("StartDate");
String endDateStr = info.getQueryParameters().getFirst("EndDate");
//pass in reqUri without query params
Expand Down

0 comments on commit b421efc

Please sign in to comment.