vikunja-api/pkg/models/team_namespace_update.go
2018-10-31 12:42:38 +00:00

16 lines
326 B
Go

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
}