summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index 0c755241ce..a50aa2dc27 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -353,8 +353,9 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) (
return nil
}
- err = repo.getUnits(e)
- if err != nil {
+ if err = repo.getUnits(e); err != nil {
+ return err
+ } else if err = repo.getOwner(e); err != nil {
return err
}