Skip to content

Commit 30de223

Browse files
committed
set agent connection
1 parent 1735fa9 commit 30de223

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Service/Agent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function create(AgentCreate $agent, UserContext $context): int
5959
$row = new Table\Generated\AgentRow();
6060
$row->setTenantId($context->getTenantId());
6161
$row->setCategoryId($context->getCategoryId());
62+
$row->setConnectionId($agent->getConnection());
6263
$row->setStatus(Table\Agent::STATUS_ACTIVE);
6364
$row->setType($agent->getType() ?? Table\Agent::TYPE_GENERAL);
6465
$row->setName($agent->getName());
@@ -99,6 +100,7 @@ public function update(string $agentId, AgentUpdate $agent, UserContext $context
99100

100101
$this->validator->assert($agent, $context->getCategoryId(), $context->getTenantId(), $existing);
101102

103+
$existing->setConnectionId($agent->getConnection() ?? $existing->getConnectionId());
102104
$existing->setType($agent->getType() ?? $existing->getType());
103105
$existing->setName($agent->getName() ?? $existing->getName());
104106
$existing->setDescription($agent->getDescription() ?? $existing->getDescription());

0 commit comments

Comments
 (0)