mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
rename CPASortOrder method
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user