1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 10:48:37 +00:00

make sure units of a team are returned (#6379) (#6381)

This commit is contained in:
Lanre Adelowo
2019-03-19 23:40:54 +01:00
committed by techknowlogick
parent 3934d9cd2f
commit 16815306ad
2 changed files with 10 additions and 0 deletions

View File

@@ -33,6 +33,11 @@ type Team struct {
Units []*TeamUnit `xorm:"-"`
}
// GetUnits return a list of available units for a team
func (t *Team) GetUnits() error {
return t.getUnits(x)
}
func (t *Team) getUnits(e Engine) (err error) {
if t.Units != nil {
return nil