Skip to content

Commit

Permalink
Remove extra assignPackageConfigs() - already handled in packageConfi…
Browse files Browse the repository at this point in the history
…gService.create()
  • Loading branch information
jen-huang committed Jul 2, 2020
1 parent d32eb27 commit 6d3006e
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,9 @@ export const createAgentConfigHandler: RequestHandler<
if (withSysMonitoring && newSysPackageConfig !== undefined && agentConfig !== undefined) {
newSysPackageConfig.config_id = agentConfig.id;
newSysPackageConfig.namespace = agentConfig.namespace;
const sysPackageConfig = await packageConfigService.create(
soClient,
callCluster,
newSysPackageConfig,
{
user,
}
);

if (sysPackageConfig) {
agentConfig = await agentConfigService.assignPackageConfigs(soClient, agentConfig.id, [
sysPackageConfig.id,
]);
}
await packageConfigService.create(soClient, callCluster, newSysPackageConfig, {
user,
});
}

const body: CreateAgentConfigResponse = {
Expand Down

0 comments on commit 6d3006e

Please sign in to comment.