summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/models/org.go b/models/org.go
index e00bef5798..ca3bce81a1 100644
--- a/models/org.go
+++ b/models/org.go
@@ -6,7 +6,6 @@
package models
import (
- "errors"
"fmt"
"os"
"strings"
@@ -20,11 +19,6 @@ import (
"xorm.io/builder"
)
-var (
- // ErrTeamNotExist team does not exist
- ErrTeamNotExist = errors.New("Team does not exist")
-)
-
// IsOwnedBy returns true if given user is in the owner team.
func (org *User) IsOwnedBy(uid int64) (bool, error) {
return IsOrganizationOwner(org.ID, uid)
@@ -304,7 +298,7 @@ type OrgUser struct {
func isOrganizationOwner(e Engine, orgID, uid int64) (bool, error) {
ownerTeam, err := getOwnerTeam(e, orgID)
if err != nil {
- if err == ErrTeamNotExist {
+ if IsErrTeamNotExist(err) {
log.Error("Organization does not have owner team: %d", orgID)
return false, nil
}