index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
modules
/
middleware
/
context.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
无闻 <joe2010xtmf@163.com>
2014-04-04 10:40:14 -0400
committer
无闻 <joe2010xtmf@163.com>
2014-04-04 10:40:14 -0400
commit
3a23476dbef0bb90ce5e8bc4c7ab8929bc04bb1b
(
patch
)
tree
8cfb016c545a0b7583fcb7e7acc5a11fc11c20a2
/
modules/middleware/context.go
parent
48d3a1fef12242c6f5c1848ca58e02d946a709da
(
diff
)
parent
75db79b4b6bcb8f61dd957c9bd21b32d4746f866
(
diff
)
Merge pull request #61 from gogits/dev
Dev
Diffstat
(limited to 'modules/middleware/context.go')
-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 d2b268cd..8129b13b 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)
}