aboutsummaryrefslogtreecommitdiffstats
path: root/models/org_team.go
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-03-19 22:50:06 +0100
committertechknowlogick <matti@mdranta.net>2019-03-19 17:50:06 -0400
commit5c82ef098e9d6138298c32f700bf46d2d5b3b14b (patch)
treea5847c97138930d269d51478daadd72b23cc94bd /models/org_team.go
parent359d3ed01dcc9b9a8b0dadba04a8df708831de23 (diff)
downloadgitea-5c82ef098e9d6138298c32f700bf46d2d5b3b14b.tar.gz
gitea-5c82ef098e9d6138298c32f700bf46d2d5b3b14b.zip
make sure units of a team are returned (#6379)
Diffstat (limited to 'models/org_team.go')
-rw-r--r--models/org_team.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/org_team.go b/models/org_team.go
index 22fb6eae24..40fdeaa75e 100644
--- a/models/org_team.go
+++ b/models/org_team.go
@@ -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