aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-08-16 21:31:08 +0800
committerGitHub <noreply@github.com>2020-08-16 21:31:08 +0800
commita961afe52bf94f71e917e05e366a4b71834a2e84 (patch)
tree707888480fd9e01a74ce636100cef93e5fe4e635 /internal
parentf667d139bc3a8ff795e7c6e1b980ab1997e428e2 (diff)
db: fix update team panic (#6253)
* db: fix update team panic * Update CHANGELOG
Diffstat (limited to 'internal')
-rw-r--r--internal/context/context.go2
-rw-r--r--internal/db/org_team.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/context/context.go b/internal/context/context.go
index a34398a2..d05767ba 100644
--- a/internal/context/context.go
+++ b/internal/context/context.go
@@ -179,7 +179,7 @@ func (c *Context) NotFound() {
// Error renders the 500 page.
func (c *Context) Error(err error, msg string) {
- log.ErrorDepth(5, "%s: %v", msg, err)
+ log.ErrorDepth(4, "%s: %v", msg, err)
c.Title("status.internal_server_error")
diff --git a/internal/db/org_team.go b/internal/db/org_team.go
index 9daca9e7..b2d6fd56 100644
--- a/internal/db/org_team.go
+++ b/internal/db/org_team.go
@@ -348,7 +348,7 @@ func UpdateTeam(t *Team, authChanged bool) (err error) {
t.LowerName = strings.ToLower(t.Name)
existingTeam := new(Team)
- has, err := x.Where("org_id=?", t.OrgID).And("lower_name=?", t.LowerName).And("id!=?", t.ID).Get(&existingTeam)
+ has, err := x.Where("org_id=?", t.OrgID).And("lower_name=?", t.LowerName).And("id!=?", t.ID).Get(existingTeam)
if err != nil {
return err
} else if has {