Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
Changes buildSchema to not modify its arguments
Browse files Browse the repository at this point in the history
Fixes #338: when invoked through `buildRuleSchema`, it modifies
`userExcludedSchema` resulting in the schema for the different rule
types be mixed.

Signed-off-by: Dimitrios Karagiannis <[email protected]>
  • Loading branch information
alkar committed Nov 15, 2019
1 parent 32a26c7 commit adafb82
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions okta/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ import (
)

func buildSchema(s, t map[string]*schema.Schema) map[string]*schema.Schema {
r := map[string]*schema.Schema{}
for key, val := range t {
r[key] = val
}
for key, val := range s {
t[key] = val
r[key] = val
}

return t
return r
}

// camel cased strings from okta responses become underscore separated to match
Expand Down

0 comments on commit adafb82

Please sign in to comment.