Upstream sync
This commit is contained in:
@@ -50,6 +50,7 @@ func (mapping *userMapping) ToUserModel(item entity.User) viewmodel.User {
|
||||
Profiles: mapping.mapper.Profile.ToProfileModelSlice(item.Profiles),
|
||||
Organizations: mapping.mapper.Organization.ToOrganizationModelSlice(item.Organizations),
|
||||
Types: mapping.mapper.Organization.ToOrganizationTypeModelSlice(item.Types),
|
||||
Type: &item.Type,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +80,12 @@ func (mapping *userMapping) ToUserEntity(item viewmodel.User) entity.User {
|
||||
Types: mapping.mapper.Organization.ToOrganizationTypeEntitySlice(item.Types),
|
||||
}
|
||||
|
||||
if item.Type == nil {
|
||||
user.Type = "S"
|
||||
} else {
|
||||
user.Type = *item.Type
|
||||
}
|
||||
|
||||
if user.Name == "" {
|
||||
user.Name = fmt.Sprintf("%s %s", item.First, item.Last)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user