WIP: страницы для правил #62

Closed
Ghost wants to merge 132 commits from master into 61-rules-pages
Showing only changes of commit a4f4679f1e - Show all commits

View File

@ -128,7 +128,8 @@ public class TimeSeriesService {
if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) {
JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new JsonTimeSeries(normalizeTimeSeries(ts))));
LOG.debug("Успешно отправлен на сервис сглаживания");
if (response.has("response") && response.getString("response").equals("empty")) {
if (response.has("response") && response.getString("response").equals("empty")
|| !response.has("timeSeries")) {
return DEFAULT_TIME_SERIES_TENDENCY;
}
JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values");