Merge pull request #659 from sameeragunarathne/master

fixing wso2/product-iots#1136
This commit is contained in:
Geeth 2017-07-18 07:12:38 +05:30 committed by GitHub
commit cc3706fc4a
2 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,7 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager {
operations = this.getValidOperationNames(); //list operations for each device type
devices = deviceManagementProviderService.getAllDevices(deviceType, false);//list devices for each type
if (!devices.isEmpty()) {
if (operations != null) {
if (operations != null && DeviceManagerUtil.getValidDeviceIdentifiers(devices).size() != 0) {
for (String str : operations) {
CommandOperation operation = new CommandOperation();
operation.setEnabled(true);

View File

@ -247,6 +247,7 @@ public final class DeviceManagerUtil {
switch (device.getEnrolmentInfo().getStatus()) {
case BLOCKED:
case REMOVED:
break;
case SUSPENDED:
break;
default: