Skip to content

Commit

Permalink
fix: add blank as default value for IAM schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikash committed Apr 4, 2022
1 parent 6abc852 commit 245d638
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/appeal/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,11 @@ func (s *Service) addCreatorDetails(a *domain.Appeal, p *domain.Policy) error {
if p.IAM.Schema != nil {
creator = map[string]interface{}{}
for schemaKey, targetKey := range p.IAM.Schema {
creator[schemaKey] = userDetailsMap[targetKey]
//This will make all value as a string
creator[schemaKey] = ""
if userDetailsMap[targetKey] != nil {
creator[schemaKey] = userDetailsMap[targetKey]
}
}
} else {
creator = userDetailsMap
Expand Down

0 comments on commit 245d638

Please sign in to comment.