File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,11 @@ async function showDeployment(args: Args): Promise<void> {
271271 ) ;
272272 return Deno . exit ( 1 ) ;
273273 }
274- const organization = project . organization ;
274+ let organization = project . organization ;
275+ if ( ! organization . name && ! organization . members ) {
276+ // project.organization does not incude members array, and we need it for naming personal orgs
277+ organization = await api . getOrganizationById ( organization . id ) ;
278+ }
275279 spinner . succeed (
276280 `The details of the deployment '${ build . deploymentId } ' are ready:` ,
277281 ) ;
Original file line number Diff line number Diff line change @@ -122,8 +122,7 @@ async function showProject(args: Args): Promise<void> {
122122 ? magenta ( project . organization . name )
123123 : `${
124124 magenta (
125- // If project exists, organization must also exist
126- ( await api . getOrganizationById ( project . organization . id ) ) ! . members [ 0 ]
125+ ( await api . getOrganizationById ( project . organization . id ) ) . members [ 0 ]
127126 . user
128127 . name ,
129128 )
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export class API {
186186 }
187187 }
188188
189- async getOrganizationById ( id : string ) : Promise < Organization | undefined > {
189+ async getOrganizationById ( id : string ) : Promise < Organization > {
190190 return await this . #requestJson( `/organizations/${ id } ` ) ;
191191 }
192192
You can’t perform that action at this time.
0 commit comments