Fix geofence creation validation

corrective-policy
Pahansith 4 years ago
parent 5e98e816cf
commit b33c5a312f

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

Loading…
Cancel
Save