mirror of https://github.com/JohnHammond/CTFd.git
fix DetachedInstanceError on /admin/statistics (#133)
see http://stackoverflow.com/questions/15397680/detaching-sqlalchemy-instance-so-no-refresh-happensselenium-screenshot-testing
parent
011e2c33c3
commit
70a0245e89
|
@ -733,7 +733,8 @@ def admin_stats():
|
|||
least_solved_chal = Challenges.query.add_columns(solves_cnt) \
|
||||
.outerjoin(solves_sub, solves_sub.columns.chalid == Challenges.id) \
|
||||
.order_by(solves_cnt.asc()).first()
|
||||
|
||||
|
||||
db.session.expunge_all()
|
||||
db.session.commit()
|
||||
db.session.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue