diff --git a/controller/user.go b/controller/user.go index 01f79179..b9b0393f 100644 --- a/controller/user.go +++ b/controller/user.go @@ -458,7 +458,11 @@ func GetUserModels(c *gin.Context) { groups := setting.GetUserUsableGroups(user.Group) var models []string for group := range groups { - models = append(models, model.GetGroupModels(group)...) + for _, g := range model.GetGroupModels(group) { + if !common.StringsContains(models, g) { + models = append(models, g) + } + } } c.JSON(http.StatusOK, gin.H{ "success": true,