mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Fix potential standings missing value
This commit is contained in:
@@ -110,6 +110,8 @@ def get_standings(count=None, admin=False, fields=[], raw_query=False):
|
|||||||
"""
|
"""
|
||||||
if count:
|
if count:
|
||||||
standings = standings_query.limit(count)
|
standings = standings_query.limit(count)
|
||||||
|
else:
|
||||||
|
standings = standings_query
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Return the raw query if requested
|
Return the raw query if requested
|
||||||
@@ -194,6 +196,8 @@ def get_team_standings(count=None, admin=False, fields=[], raw_query=False):
|
|||||||
|
|
||||||
if count:
|
if count:
|
||||||
standings = standings_query.limit(count)
|
standings = standings_query.limit(count)
|
||||||
|
else:
|
||||||
|
standings = standings_query
|
||||||
|
|
||||||
if raw_query:
|
if raw_query:
|
||||||
return standings
|
return standings
|
||||||
@@ -274,6 +278,8 @@ def get_user_standings(count=None, admin=False, fields=[], raw_query=False):
|
|||||||
|
|
||||||
if count:
|
if count:
|
||||||
standings = standings_query.limit(count)
|
standings = standings_query.limit(count)
|
||||||
|
else:
|
||||||
|
standings = standings_query
|
||||||
|
|
||||||
if raw_query:
|
if raw_query:
|
||||||
return standings
|
return standings
|
||||||
|
|||||||
Reference in New Issue
Block a user