ordered user orgs alphabeticaly fixes #11556

This commit is contained in:
Patrick O'Carroll 2018-04-13 14:53:36 +02:00
parent 55d262655a
commit 9ad8a77a21

View File

@ -333,6 +333,7 @@ func GetUserOrgList(query *m.GetUserOrgListQuery) error {
sess.Join("INNER", "org", "org_user.org_id=org.id")
sess.Where("org_user.user_id=?", query.UserId)
sess.Cols("org.name", "org_user.role", "org_user.org_id")
sess.OrderBy("org.name")
err := sess.Find(&query.Result)
return err
}