Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions webapps/console/lib/server/config-objects-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
Loading