Skip to content
Snippets Groups Projects
Commit f2426f39 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

feat: Order by time of observation, add logging

parent b1e1dfc7
No related branches found
No related tags found
No related merge requests found
......@@ -604,6 +604,8 @@ public class ObservationBean {
parameters.put("isPositive", isPositive);
}
sql += "ORDER BY time_of_observation DESC";
LOGGER.debug(sql);
Query q = em.createNativeQuery(sql, Observation.class);
......
......@@ -176,6 +176,8 @@ public class ObservationService {
user != null ? user.getOrganizationId().getDefaultLocale() :
userBean.getOrganization(organizationId).getDefaultLocale());
LOGGER.debug("Get filtered observations for user {}", user != null ? user.getUserId() : "<no user>");
List<ObservationListItem> observations = getFilteredObservationsFromBackend(
organizationId,
pestId,
......@@ -195,8 +197,7 @@ public class ObservationService {
)
);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
LOGGER.error("Exception when getting localized observation data schema for observation " + obs.getObservationId(), e);
return null;
}
}).collect(Collectors.toList());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment