Commit ba5a65ce authored by Sebastian Chicoma's avatar Sebastian Chicoma

Enviando usuario en la sincronización

parent 5328cb69
......@@ -20,6 +20,7 @@ import java.util.Map;
public enum AgentStatusEnum {
CREATED("CR"),
PENDING_SYNCHRONIZED("PS"),
DEPLOYED("DP"),
DELETED("DE");
......
......@@ -163,6 +163,8 @@ public class AgentService extends CustomPaginationService<Agent> {
}
}
boolean changeToPendingSynchronized = false;
for (FrequentQuestionBean frequentQuestionBean : agent.getFrequentQuestions()) {
FrequentQuestion frequentQuestionBD = null;
......@@ -179,6 +181,8 @@ public class AgentService extends CustomPaginationService<Agent> {
frequentQuestionBD.setStatus(FrequentQuestionStatusEnum.PENDING_SYNCHRONIZED);
frequentQuestionBD.setUploadDate(LocalDateTime.now());
frequentQuestionBD.setUuid(frequentQuestionBean.getUuid());
changeToPendingSynchronized = true;
}
frequentQuestionBD.setAgent(agentBD);
......@@ -191,6 +195,11 @@ public class AgentService extends CustomPaginationService<Agent> {
}
if (changeToPendingSynchronized) {
agentBD.setStatus(AgentStatusEnum.PENDING_SYNCHRONIZED);
agentBD = agentRepository.save(agentBD);
}
// Deployment channels
if (agent.getDeploymentChannels() == null) {
agent.setDeploymentChannels(new ArrayList<>());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment