mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #495 from rasika/release-2.0.x
IOTS-325: Fixing cannot delete a policy associated with a group
This commit is contained in:
commit
7619eabc87
@ -1361,6 +1361,11 @@ public class PolicyDAOImpl implements PolicyDAO {
|
||||
stmt.setInt(1, policyId);
|
||||
stmt.executeUpdate();
|
||||
|
||||
String deleteGroup = "DELETE FROM DM_DEVICE_GROUP_POLICY WHERE POLICY_ID = ?";
|
||||
stmt = conn.prepareStatement(deleteGroup);
|
||||
stmt.setInt(1, policyId);
|
||||
stmt.executeUpdate();
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Policy (" + policyId + ") related configs deleted from database.");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user