Skip to content

Commit b760f1d

Browse files
gcp-cherry-pick-bot[bot]Emyrkmatifali
authored
chore: prevent null loading sync settings (cherry-pick #17430) (#17433)
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com> Co-authored-by: M Atif Ali <atif@coder.com>
1 parent f8d3fbf commit b760f1d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

coderd/idpsync/group.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ func (s *GroupSyncSettings) Set(v string) error {
268268
}
269269

270270
func (s *GroupSyncSettings) String() string {
271+
if s.Mapping == nil {
272+
s.Mapping = make(map[string][]uuid.UUID)
273+
}
271274
return runtimeconfig.JSONString(s)
272275
}
273276

coderd/idpsync/organization.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ func (s *OrganizationSyncSettings) Set(v string) error {
168168
}
169169

170170
func (s *OrganizationSyncSettings) String() string {
171+
if s.Mapping == nil {
172+
s.Mapping = make(map[string][]uuid.UUID)
173+
}
171174
return runtimeconfig.JSONString(s)
172175
}
173176

coderd/idpsync/role.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,8 @@ func (s *RoleSyncSettings) Set(v string) error {
286286
}
287287

288288
func (s *RoleSyncSettings) String() string {
289+
if s.Mapping == nil {
290+
s.Mapping = make(map[string][]string)
291+
}
289292
return runtimeconfig.JSONString(s)
290293
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy