Skip to content

Commit

Permalink
fix: ignore services with no projects when mapping (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbystedt authored Jan 17, 2025
1 parent 99cd670 commit e08050d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ kind: Component
metadata:
name: nr-broker-app
description: NR Broker handles the business logic of authenticating and validating requests for automated processes to access secrets.
title: NR Broker
annotations:
github.com/project-slug: "bcgov-nr/nr-broker"
backstage.io/techdocs-ref: dir:.
spec:
system: nr-broker
type: website
lifecycle: production
owner: oneteam
owner: Oscar
4 changes: 4 additions & 0 deletions src/persistence/mongo/graph-mongo.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,10 @@ export class GraphMongoRepository implements GraphRepository {
.then((servProjArr: any[]) => {
const acc: BrokerAccountProjectMapDto = {};
for (const servProj of servProjArr) {
if (!servProj.project[0]) {
// Can't map what doesn't exist
continue;
}
if (!acc[servProj.project[0].name]) {
acc[servProj.project[0].name] = {
name: servProj.project[0].name,
Expand Down

0 comments on commit e08050d

Please sign in to comment.