1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 22:11:29 +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
commit c9b6e4f825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -943,7 +943,7 @@ func (p *ControllerRegister) handleParamResponse(context *beecontext.Context, ex
context.RenderMethodResult(resultValue) 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) context.Output.SetStatus(200)
} }
} }