mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Sort challenges by id (#1914)
* Sort challenges by ID as well as value in `/api/v1/challenges` to better standardize API output
This commit is contained in:
@@ -227,7 +227,9 @@ class ChallengeList(Resource):
|
||||
and_(Challenges.state != "hidden", Challenges.state != "locked")
|
||||
)
|
||||
chal_q = (
|
||||
chal_q.filter_by(**query_args).filter(*filters).order_by(Challenges.value)
|
||||
chal_q.filter_by(**query_args)
|
||||
.filter(*filters)
|
||||
.order_by(Challenges.value, Challenges.id)
|
||||
)
|
||||
|
||||
# Iterate through the list of challenges, adding to the object which
|
||||
|
||||
Reference in New Issue
Block a user