From 1922f1507dcb030f9b6509b34b5acb78ffd0b1c9 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 28 Jul 2025 16:42:11 -0700 Subject: [PATCH] Checking for elevationUnits changes during patch. --- .../src/main/java/cwms/cda/api/LocationController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cwms-data-api/src/main/java/cwms/cda/api/LocationController.java b/cwms-data-api/src/main/java/cwms/cda/api/LocationController.java index cf759dda55..039cb4caa9 100644 --- a/cwms-data-api/src/main/java/cwms/cda/api/LocationController.java +++ b/cwms-data-api/src/main/java/cwms/cda/api/LocationController.java @@ -497,6 +497,8 @@ private Location getUpdatedLocation(Location existingLocation, Location updatedL ? existingLocation.getVerticalDatum() : updatedLocation.getVerticalDatum(); Double updatedElevation = updatedLocation.getElevation() == null ? existingLocation.getElevation() : updatedLocation.getElevation(); + String updatedElevationUnits = updatedLocation.getElevationUnits() == null + ? existingLocation.getElevationUnits() : updatedLocation.getElevationUnits(); String updatedMapLabel = updatedLocation.getMapLabel() == null ? existingLocation.getMapLabel() : updatedLocation.getMapLabel(); String updatedBoundingOfficeId = updatedLocation.getBoundingOfficeId() == null @@ -519,6 +521,7 @@ private Location getUpdatedLocation(Location existingLocation, Location updatedL .withPublishedLatitude(updatedPublishedLatitude) .withVerticalDatum(updatedVerticalDatum) .withElevation(updatedElevation) + .withElevationUnits(updatedElevationUnits) .withMapLabel(updatedMapLabel) .withBoundingOfficeId(updatedBoundingOfficeId) .build();