From dda1e13ae19fb8489a70283bb03031c218a0d355 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Mon, 14 Jan 2019 13:09:23 +0100 Subject: [PATCH] Bugfix: Allowing a GRID point to not have a weather data source --- .../vips/logic/entity/PointOfInterestWeatherStation.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java index 019363ce..81827edc 100755 --- a/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java +++ b/src/main/java/no/nibio/vips/logic/entity/PointOfInterestWeatherStation.java @@ -134,8 +134,12 @@ public class PointOfInterestWeatherStation extends PointOfInterest implements Se @Transient public String getDataFetchUri() { - String dataRequestUri = String.format(this.getWeatherStationDataSourceId().getDatafetchUriExpression(),this.getWeatherStationRemoteId()); - return dataRequestUri; + if(this.getWeatherStationDataSourceId() != null) + { + String dataRequestUri = String.format(this.getWeatherStationDataSourceId().getDatafetchUriExpression(),this.getWeatherStationRemoteId()); + return dataRequestUri; + } + return ""; } /** -- GitLab