From efa74030b4b96c66d236329360003cbe5b805586 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Fri, 3 Jun 2016 10:25:22 +0530 Subject: [PATCH] Fixing response duplicate issue --- .../core/operation/mgt/dao/impl/GenericOperationDAOImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java index c6343156ee6..d96920d703a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java @@ -412,7 +412,9 @@ public class GenericOperationDAOImpl implements OperationDAO { activity.getActivityStatus().add(activityStatus); enrolmentId = rs.getInt("ENROLMENT_ID"); - } else { + } + + if (operationId == rs.getInt("OPERATION_ID") && enrolmentId == rs.getInt("ENROLMENT_ID")){ if (rs.getTimestamp("RECEIVED_TIMESTAMP") != (null)) { activityStatus.getResponses().add(this.getOperationResponse(rs)); }