diff --git a/server/channels/app/custom_profile_attributes.go b/server/channels/app/custom_profile_attributes.go index 00e1809ef95..be486e0cb27 100644 --- a/server/channels/app/custom_profile_attributes.go +++ b/server/channels/app/custom_profile_attributes.go @@ -72,7 +72,7 @@ func (a *App) ListCPAFields() ([]*model.PropertyField, *model.AppError) { } sort.Slice(fields, func(i, j int) bool { - return model.CustomProfileAttributesPropertySortOrder(fields[i]) < model.CustomProfileAttributesPropertySortOrder(fields[j]) + return model.CPASortOrder(fields[i]) < model.CPASortOrder(fields[j]) }) return fields, nil diff --git a/server/public/model/custom_profile_attributes.go b/server/public/model/custom_profile_attributes.go index f4d2f885168..f4a7d233811 100644 --- a/server/public/model/custom_profile_attributes.go +++ b/server/public/model/custom_profile_attributes.go @@ -14,7 +14,7 @@ const CustomProfileAttributesPropertyGroupName = "custom_profile_attributes" const CustomProfileAttributesPropertyAttrsSortOrder = "sort_order" -func CustomProfileAttributesPropertySortOrder(p *PropertyField) int { +func CPASortOrder(p *PropertyField) int { value, ok := p.Attrs[CustomProfileAttributesPropertyAttrsSortOrder] if !ok { return 0