Skip to content

Commit

Permalink
Insure sensor is non-null on platform export
Browse files Browse the repository at this point in the history
  • Loading branch information
colecu committed Feb 9, 2024
1 parent 2517582 commit 62a1cfb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@ private JSONArray exportPlatform() {
JSONObject platform = new JSONObject();
platform.put("ShortName", datasetSource.getDatasetSourcePK().getSource().getSourceShortName());

if (!datasetSource.getDatasetSourcePK().getSensor().getSensorShortName().trim().isEmpty()) {
Sensor sensor = datasetSource.getDatasetSourcePK().getSensor();
if (sensor != null && !sensor.getSensorShortName().trim().isEmpty()) {
JSONArray instruments = new JSONArray();
JSONObject instrument = new JSONObject();
instrument.put("ShortName", datasetSource.getDatasetSourcePK().getSensor().getSensorShortName());
Expand Down

0 comments on commit 62a1cfb

Please sign in to comment.