We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f21f2dc commit da54ab4Copy full SHA for da54ab4
coderd/database/db2sdk/db2sdk.go
@@ -163,6 +163,12 @@ func ReducedUsers(users []database.User) []codersdk.ReducedUser {
163
}
164
165
func User(user database.User, organizationIDs []uuid.UUID) codersdk.User {
166
+ if organizationIDs == nil {
167
+ // Never return `null` for the list. The typescript SDK does
168
+ // '!organizationIDs', and 'null' is true, where '[]' is false.
169
+ organizationIDs = []uuid.UUID{}
170
+ }
171
+
172
convertedUser := codersdk.User{
173
ReducedUser: ReducedUser(user),
174
OrganizationIDs: organizationIDs,
0 commit comments