WIP: страницы для правил #62
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user