diff --git a/webapps/console/lib/server/config-objects-service.ts b/webapps/console/lib/server/config-objects-service.ts index 97a74f12c..3e2947517 100644 --- a/webapps/console/lib/server/config-objects-service.ts +++ b/webapps/console/lib/server/config-objects-service.ts @@ -220,11 +220,15 @@ export class ConfigObjectsService { }); if (["destination", "service"].includes(type)) { - const count = await this.prisma.configurationObject.count({ - where: { workspaceId, type: type, deleted: false }, + const destinations = await this.prisma.configurationObject.count({ + where: { workspaceId, type: "destination", deleted: false }, }); - if (count === 1) { + const services = await this.prisma.configurationObject.count({ + where: { workspaceId, type: "service", deleted: false }, + }); + + if (destinations + services === 1) { withProductAnalytics( p => p.track("workspace_activated", {