mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'permanent-delete' into 'master'
Fix Permanent delete for multiple enrollments ## Purpose To enable permanent deletion of a sinlge device with multiple enroolmemts ## Goals > (Goals achieved by feature) ## Approach ## Documentation ## Automation tests ## Security checks - Followed secure coding standards? (yes/no) - Ran FindSecurityBugs plugin and verified report? (yes/no) - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? (yes/no) ## Related MRs ## Test environment ## Learning See merge request entgra/carbon-device-mgt!296
This commit is contained in:
commit
ebf46f46e1
@ -533,10 +533,10 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
||||
try {
|
||||
DeviceManagementDAOFactory.beginTransaction();
|
||||
existingDevices = deviceDAO.getDevicesByIdentifiers(deviceIdentifiers, tenantId);
|
||||
if (existingDevices.size() != deviceIdentifiers.size()) {
|
||||
for (Device device : existingDevices) {
|
||||
deviceIdentifiers.remove(device.getDeviceIdentifier());
|
||||
}
|
||||
for (Device device : existingDevices) {
|
||||
deviceIdentifiers.remove(device.getDeviceIdentifier());
|
||||
}
|
||||
if (!deviceIdentifiers.isEmpty()) {
|
||||
String msg =
|
||||
"Couldn't find device ids for all the requested device identifiers. " +
|
||||
"Therefore payload should contain device identifiers which are not in the system. " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user