1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-23 06:10:19 +00:00

Merge pull request #2981 from TankTheFrank/fix_template_render_with_automatic_parameter_routing

fixes template rendering with automatic mapped parameters (see #2979)
This commit is contained in:
astaxie
2018-07-20 15:39:10 +08:00
committed by GitHub

View File

@ -943,7 +943,7 @@ func (p *ControllerRegister) handleParamResponse(context *beecontext.Context, ex
context.RenderMethodResult(resultValue)
}
}
if !context.ResponseWriter.Started && context.Output.Status == 0 {
if !context.ResponseWriter.Started && len(results) > 0 && context.Output.Status == 0 {
context.Output.SetStatus(200)
}
}