Skip to content

Commit

Permalink
fix(sdl): fallback credentials email to an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrishajev committed May 13, 2024
1 parent 0211266 commit 4657dc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/sdl/SDL/SDL.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ describe("SDL", () => {
{
services: [
{
credentials
credentials: {
...credentials,
email: ""
}
}
]
}
Expand Down
7 changes: 6 additions & 1 deletion src/sdl/SDL/SDL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,11 @@ export class SDL {
const service = this.data.services[name];
const deployment = this.data.deployment[name];
const profile = this.data.profiles.compute[deployment[placement].profile];
const credentials = service.credentials || null;

if (credentials && !credentials.email) {
credentials.email = "";
}

return {
name: name,
Expand All @@ -675,7 +680,7 @@ export class SDL {
count: deployment[placement].count,
expose: this.v3ManifestExpose(service),
params: this.v3ManifestServiceParams(service.params),
credentials: service.credentials || null
credentials
};
}

Expand Down

0 comments on commit 4657dc5

Please sign in to comment.