summaryrefslogtreecommitdiffstats
path: root/models/org_team.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/org_team.go')
-rw-r--r--models/org_team.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/org_team.go b/models/org_team.go
index 3b37f936ff..505f11d39d 100644
--- a/models/org_team.go
+++ b/models/org_team.go
@@ -215,7 +215,11 @@ func (t *Team) RemoveRepository(repoID int64) error {
// UnitEnabled returns if the team has the given unit type enabled
func (t *Team) UnitEnabled(tp UnitType) bool {
- if err := t.getUnits(x); err != nil {
+ return t.unitEnabled(x, tp)
+}
+
+func (t *Team) unitEnabled(e Engine, tp UnitType) bool {
+ if err := t.getUnits(e); err != nil {
log.Warn("Error loading repository (ID: %d) units: %s", t.ID, err.Error())
}