From cfa2f794cb1d6a312e284c4e7be67eb750b0ffc2 Mon Sep 17 00:00:00 2001 From: "Claudio Maggioni (maggicl)" Date: Tue, 28 Apr 2020 10:48:09 +0200 Subject: [PATCH] fix --- .../sanmarinoes/smarthut/controller/ThermostatController.java | 2 +- .../inf/sa4/sanmarinoes/smarthut/service/ThermostatService.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java index 6761ee5..7a6fc59 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java @@ -32,8 +32,8 @@ public class ThermostatController { newT.setUseExternalSensors(t.isUseExternalSensors()); newT.setOn(t.isTurnOn()); - newT = deviceService.saveAsOwner(newT, principal.getName()); thermostatService.populateMeasuredTemperature(newT); + newT = deviceService.saveAsOwner(newT, principal.getName()); return newT; } diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/service/ThermostatService.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/service/ThermostatService.java index e214e39..cdbb92c 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/service/ThermostatService.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/service/ThermostatService.java @@ -72,7 +72,6 @@ public class ThermostatService { populateMeasuredTemperature(u); t = Optional.of(u); } - return t; }