mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-22 08:14:24 +01:00
Fix for hidden teams being visible on the team listing page and score… (#880)
* Fix for hidden teams being visible on the team listing page and scoreboard endpoints
This commit is contained in:
@@ -28,8 +28,8 @@ def listing():
|
||||
# count = Teams.query.filter_by(verified=True, banned=False).count()
|
||||
# teams = Teams.query.filter_by(verified=True, banned=False).slice(page_start, page_end).all()
|
||||
# else:
|
||||
count = Teams.query.filter_by(banned=False).count()
|
||||
teams = Teams.query.filter_by(banned=False).slice(page_start, page_end).all()
|
||||
count = Teams.query.filter_by(hidden=False, banned=False).count()
|
||||
teams = Teams.query.filter_by(hidden=False, banned=False).slice(page_start, page_end).all()
|
||||
|
||||
pages = int(count / results_per_page) + (count % results_per_page > 0)
|
||||
return render_template('teams/teams.html', teams=teams, pages=pages, curr_page=page)
|
||||
|
||||
Reference in New Issue
Block a user