diff --git a/pkg/models/list_users.go b/pkg/models/list_users.go index 9fdc01eb..5fdbb95f 100644 --- a/pkg/models/list_users.go +++ b/pkg/models/list_users.go @@ -235,11 +235,11 @@ func (lu *ListUser) Update() (err error) { } // Check if the user exists - user, err := user.GetUserByUsername(lu.Username) + u, err := user.GetUserByUsername(lu.Username) if err != nil { return err } - lu.UserID = user.ID + lu.UserID = u.ID _, err = x. Where("list_id = ? AND user_id = ?", lu.ListID, lu.UserID). diff --git a/pkg/models/namespace_team.go b/pkg/models/namespace_team.go index 8029e6e5..13bafcc9 100644 --- a/pkg/models/namespace_team.go +++ b/pkg/models/namespace_team.go @@ -220,7 +220,7 @@ func (tn *TeamNamespace) Update() (err error) { } _, err = x. - Where("namespace_id = ? AND team_id = ?", tn.TeamID, tn.TeamID). + Where("namespace_id = ? AND team_id = ?", tn.NamespaceID, tn.TeamID). Cols("right"). Update(tn) return