mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Fix challenge filter in /api/v1/statistics/challenges/solves (#1529)
* Fix showing hidden challenge solve count in admin statistics page
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from flask_restx import Resource
|
||||
from sqlalchemy import func
|
||||
from sqlalchemy.sql import or_
|
||||
from sqlalchemy.sql import and_
|
||||
|
||||
from CTFd.api.v1.statistics import statistics_namespace
|
||||
from CTFd.models import Challenges, Solves, db
|
||||
@@ -31,7 +31,7 @@ class ChallengeSolveStatistics(Resource):
|
||||
def get(self):
|
||||
chals = (
|
||||
Challenges.query.filter(
|
||||
or_(Challenges.state != "hidden", Challenges.state != "locked")
|
||||
and_(Challenges.state != "hidden", Challenges.state != "locked")
|
||||
)
|
||||
.order_by(Challenges.value)
|
||||
.all()
|
||||
|
||||
Reference in New Issue
Block a user