mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fixing https://github.com/wso2/product-iots/issues/1136 : DeviceDetailsRetrieverTask attempts to add operations to a device that has been removed
This commit is contained in:
parent
70ac927b16
commit
9db742e95a
@ -92,7 +92,7 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager {
|
|||||||
operations = this.getValidOperationNames(); //list operations for each device type
|
operations = this.getValidOperationNames(); //list operations for each device type
|
||||||
devices = deviceManagementProviderService.getAllDevices(deviceType, false);//list devices for each type
|
devices = deviceManagementProviderService.getAllDevices(deviceType, false);//list devices for each type
|
||||||
if (!devices.isEmpty()) {
|
if (!devices.isEmpty()) {
|
||||||
if (operations != null) {
|
if (operations != null && DeviceManagerUtil.getValidDeviceIdentifiers(devices).size() != 0) {
|
||||||
for (String str : operations) {
|
for (String str : operations) {
|
||||||
CommandOperation operation = new CommandOperation();
|
CommandOperation operation = new CommandOperation();
|
||||||
operation.setEnabled(true);
|
operation.setEnabled(true);
|
||||||
|
|||||||
@ -247,6 +247,7 @@ public final class DeviceManagerUtil {
|
|||||||
switch (device.getEnrolmentInfo().getStatus()) {
|
switch (device.getEnrolmentInfo().getStatus()) {
|
||||||
case BLOCKED:
|
case BLOCKED:
|
||||||
case REMOVED:
|
case REMOVED:
|
||||||
|
break;
|
||||||
case SUSPENDED:
|
case SUSPENDED:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user