diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-03 15:50:55 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-03 15:50:55 -0400 |
commit | 79a610592ea7c2e93ab2f91190af1782c4aa8f8d (patch) | |
tree | 94515ccd8e27fc7f01c08daea725bdd2f3dbee6a /modules | |
parent | bbadbbdf685a7f6cb1924442a115aa88bb520e07 (diff) | |
download | gitea-79a610592ea7c2e93ab2f91190af1782c4aa8f8d.tar.gz gitea-79a610592ea7c2e93ab2f91190af1782c4aa8f8d.zip |
Add: rename repository
Diffstat (limited to 'modules')
-rw-r--r-- | modules/middleware/context.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go index d2b268cd87..8129b13b7e 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -90,7 +90,9 @@ func (ctx *Context) HTML(status int, name string, htmlOpt ...HTMLOptions) { func (ctx *Context) RenderWithErr(msg, tpl string, form auth.Form) { ctx.Data["HasError"] = true ctx.Data["ErrorMsg"] = msg - auth.AssignForm(form, ctx.Data) + if form != nil { + auth.AssignForm(form, ctx.Data) + } ctx.HTML(200, tpl) } |