Merge branch 'geofence-api' into 'corrective-policy'

Fix geofence creation validation

See merge request entgra/carbon-device-mgt!651
corrective-policy
Inosh Perara 4 years ago
commit f7843e5c35

@ -533,7 +533,7 @@ public class RequestValidationUtil {
throw new InputValidationException(
new ErrorResponse.ErrorResponseBuilder().setCode(HttpStatus.SC_BAD_REQUEST).setMessage(msg).build());
}
if (!geofenceWrapper.getGeoJson().trim().isEmpty()) {
if (geofenceWrapper.getGeoJson() != null && !geofenceWrapper.getGeoJson().trim().isEmpty()) {
isGeoJsonExists = true;
}
if ((geofenceWrapper.getLatitude() < -90 || geofenceWrapper.getLatitude() > 90) && !isGeoJsonExists) {

Loading…
Cancel
Save