mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user