chore: prevent null loading sync settings (#17430)

Nulls passed to the frontend caused a page to fail to load.

`Record<string,string>` can be `nil` in golang
This commit is contained in:
Steven Masley
2025-04-16 14:39:57 -05:00
committed by GitHub
parent d20966d500
commit c4d3dd2791
3 changed files with 9 additions and 0 deletions

View File

@ -268,6 +268,9 @@ func (s *GroupSyncSettings) Set(v string) error {
}
func (s *GroupSyncSettings) String() string {
if s.Mapping == nil {
s.Mapping = make(map[string][]uuid.UUID)
}
return runtimeconfig.JSONString(s)
}

View File

@ -217,6 +217,9 @@ func (s *OrganizationSyncSettings) Set(v string) error {
}
func (s *OrganizationSyncSettings) String() string {
if s.Mapping == nil {
s.Mapping = make(map[string][]uuid.UUID)
}
return runtimeconfig.JSONString(s)
}

View File

@ -286,5 +286,8 @@ func (s *RoleSyncSettings) Set(v string) error {
}
func (s *RoleSyncSettings) String() string {
if s.Mapping == nil {
s.Mapping = make(map[string][]string)
}
return runtimeconfig.JSONString(s)
}