Users should always be able to get their score, even if banned (#333)

* Users should always be able to get their score, even if banned
* Fixing scoring logic when users haven't solved problems
* Hide None descriptions for awards
This commit is contained in:
Kevin Chung
2017-08-06 19:33:02 -04:00
committed by GitHub
parent 59afb3d356
commit 7aa6204116
4 changed files with 72 additions and 3 deletions

View File

@@ -101,6 +101,13 @@ def gen_team(db, name='name', email='user@ctfd.io', password='password'):
return team
def gen_hint(db, chal, hint="This is a hint", cost=0, type=0):
hint = Hints(chal, hint, cost, type)
db.session.add(hint)
db.session.commit()
return hint
def gen_solve(db, teamid, chalid, ip='127.0.0.1', flag='rightkey'):
solve = Solves(teamid, chalid, ip, flag)
db.session.add(solve)