summaryrefslogtreecommitdiffstats
path: root/models/org_team.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2017-07-06 15:30:19 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-07-06 21:30:19 +0800
commit30787e48f219b23701f660ba0b99b326ab82e997 (patch)
tree005dfef495149e81e78ad31c251cc3a3e2709870 /models/org_team.go
parent2ef33b53381f68dc2af88eabfe5f35c3dbc94412 (diff)
downloadgitea-30787e48f219b23701f660ba0b99b326ab82e997.tar.gz
gitea-30787e48f219b23701f660ba0b99b326ab82e997.zip
Improve org error handling (#2117)
* Improve ErrOrgNotExist type Return new error type Use good error check Use new method to check error Update tests * Fix unchanged method name report
Diffstat (limited to 'models/org_team.go')
-rw-r--r--models/org_team.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/org_team.go b/models/org_team.go
index a7a1ba85d6..8508a176c1 100644
--- a/models/org_team.go
+++ b/models/org_team.go
@@ -230,7 +230,7 @@ func NewTeam(t *Team) (err error) {
if err != nil {
return err
} else if !has {
- return ErrOrgNotExist
+ return ErrOrgNotExist{t.OrgID, ""}
}
t.LowerName = strings.ToLower(t.Name)