vikunja-api/pkg/models/team_namespace_update.go

17 lines
326 B
Go
Raw Normal View History

package models
// Update updates a team <-> namespace relation
func (tl *TeamNamespace) Update() (err error) {
// Check if the right is valid
if err := tl.Right.isValid(); err != nil {
return err
}
_, err = x.
Where("namespace_id = ? AND team_id = ?", tl.TeamID, tl.TeamID).
Cols("right").
Update(tl)
return
}