From e451be53717641fc5d499f140c03f1723588b320 Mon Sep 17 00:00:00 2001 From: edgarfuste <34737125+edgarfuste@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:39:56 +0200 Subject: [PATCH] fix: Manage change valve status on "ve_node_shutoff_valve" view --- ws/fct/ws_gw_fct_setchangevalvestatus.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ws/fct/ws_gw_fct_setchangevalvestatus.sql b/ws/fct/ws_gw_fct_setchangevalvestatus.sql index 15f853b0b6..d46c2e5822 100644 --- a/ws/fct/ws_gw_fct_setchangevalvestatus.sql +++ b/ws/fct/ws_gw_fct_setchangevalvestatus.sql @@ -60,9 +60,9 @@ BEGIN END IF; raise notice 'node_id %', v_node; - IF (SELECT count(*) FROM man_valve WHERE node_id = v_node) > 0 THEN + IF (SELECT count(*) FROM ve_node_shutoff_valve WHERE node_id = v_node) > 0 THEN - UPDATE man_valve SET closed = NOT closed WHERE node_id = v_node; + UPDATE ve_node_shutoff_valve SET closed = NOT closed WHERE node_id = v_node; --v_message = 'Change valve status done successfully. You can continue by clicking on more valves or finish the process by executing Refresh Mincut'; EXECUTE 'SELECT gw_fct_getmessage($${"client":{"device":4, "infoType":1, "lang":"ES"},"feature":{}, "data":{"message":"3176", "function":"3026","debug_msg":"", "is_process":true}}$$)'