From 14580b5f5fe6a1cfaa93b652f07d15cf1d1e3a7d Mon Sep 17 00:00:00 2001 From: pramilaniroshan Date: Thu, 16 May 2024 08:05:43 +0530 Subject: [PATCH] Fix EVENT_REVOKE operation is not being sent after geofence delete --- .../mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java | 3 +++ .../mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java index 191852ced34..67c8bf26f7d 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/GenericGeofenceDAOImpl.java @@ -626,6 +626,9 @@ public class GenericGeofenceDAOImpl extends AbstractGeofenceDAOImpl { geofenceData.setGroupData(groupMap); } } + if (geofenceData != null) { + geofenceData.setGroupIds(new ArrayList<>(groupMap.keySet())); + } return geofenceData; } } catch (SQLException e) { diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java index c1a719f446c..db15476b482 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/geofence/SQLServerGeofenceDAOImpl.java @@ -157,6 +157,9 @@ public class SQLServerGeofenceDAOImpl extends AbstractGeofenceDAOImpl { geofenceData.setFenceShape(rst.getString("FENCE_SHAPE")); geofenceData.setGroupData(groupMap); } + if (geofenceData != null) { + geofenceData.setGroupIds(new ArrayList<>(groupMap.keySet())); + } return geofenceData; } }