(refs #1101)No need transaction for /git-lfs

This commit is contained in:
Naoki Takezoe
2017-01-04 07:47:23 +09:00
parent 3b99e619db
commit 4dfc9fc456

View File

@@ -21,8 +21,10 @@ class TransactionFilter extends Filter {
def destroy(): Unit = {}
def doFilter(req: ServletRequest, res: ServletResponse, chain: FilterChain): Unit = {
if(req.asInstanceOf[HttpServletRequest].getServletPath().startsWith("/assets/")){
// assets don't need transaction
val servletPath = req.asInstanceOf[HttpServletRequest].getServletPath()
println(servletPath)
if(servletPath.startsWith("/assets/") || servletPath.startsWith("/git-lfs")){
// assets and git-lfs don't need transaction
chain.doFilter(req, res)
} else {
Database() withTransaction { session =>