vikunja-api/pkg/models/team_list_update.go

17 lines
311 B
Go
Raw Normal View History

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