File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ export class DBOrgSettings implements OrganizationSettings {
18
18
} )
19
19
workspaceSharingDisabled ?: boolean ;
20
20
21
- @Column ( )
22
- defaultWorkspaceImage ?: string ; // TODO: migration
21
+ @Column ( "varchar" , { nullable : true } )
22
+ defaultWorkspaceImage ?: string | null ; // TODO: migration
23
23
24
24
@Column ( )
25
25
deleted : boolean ;
Original file line number Diff line number Diff line change @@ -381,7 +381,10 @@ export class TeamDBImpl extends TransactionalDBImpl<TeamDB> implements TeamDB {
381
381
if ( settings . workspaceSharingDisabled != undefined ) {
382
382
update . workspaceSharingDisabled = settings . workspaceSharingDisabled ;
383
383
}
384
- if ( settings . defaultWorkspaceImage ) {
384
+ // Set to null if defaultWorkspaceImage is empty string, so that we can fallback to default when getting org settings
385
+ if ( settings . defaultWorkspaceImage ?. trim ( ) === "" ) {
386
+ update . defaultWorkspaceImage = null ;
387
+ } else if ( settings . defaultWorkspaceImage != undefined ) {
385
388
update . defaultWorkspaceImage = settings . defaultWorkspaceImage ;
386
389
}
387
390
if ( ! team ) {
Original file line number Diff line number Diff line change @@ -2256,8 +2256,8 @@ type TeamMembershipInvite struct {
2256
2256
}
2257
2257
2258
2258
type OrganizationSettings struct {
2259
- WorkspaceSharingDisabled bool `json:"workspaceSharingDisabled,omitempty"`
2260
- DefaultWorkspaceImage string `json:"defaultWorkspaceImage,omitempty"`
2259
+ WorkspaceSharingDisabled bool `json:"workspaceSharingDisabled,omitempty"`
2260
+ DefaultWorkspaceImage * string `json:"defaultWorkspaceImage,omitempty"`
2261
2261
}
2262
2262
2263
2263
type Project struct {
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ export interface Organization {
168
168
169
169
export interface OrganizationSettings {
170
170
workspaceSharingDisabled ?: boolean ;
171
- defaultWorkspaceImage ?: string ;
171
+ defaultWorkspaceImage ?: string | null ;
172
172
}
173
173
174
174
export type TeamMemberRole = OrgMemberRole ;
You can’t perform that action at this time.
0 commit comments