From 7b97bd75aeca8eed6177db576bc899e4fa054063 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 3 Mar 2017 16:25:45 -0600 Subject: [PATCH] fixed uniqueid on copy --- pom.xml | 2 +- src/main/resources/public/scripts/app.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b62cad6..af9159c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 4.2.0a + 4.2.0b jar HA Bridge diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index 612162d..484f08b 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -2447,8 +2447,11 @@ app.controller('EditController', function ($scope, $location, $http, bridgeServi bridgeService.displayWarn("Error adding device. Name has not been changed from original.", null); return; } - if (copy) + if (copy) { $scope.device.id = null; + $scope.device.uniqueid = null; + $scope.device.mapId = $scope.device.mapId + "-copy"; + } if($scope.mapTypeSelected !== undefined && $scope.mapTypeSelected !== null) $scope.device.mapType = $scope.mapTypeSelected[0]; else