Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod filters being broken on score list loading #194

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions profiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def get(self, request, user_id, gamemode):
"""
Return Scores based on a user_id, gamemode, score_set, and various filters
"""
if "required_mods_json" in request.query_params:
required_mods_json = request.query_params["required_mods_json"]
if "required_mods_json[]" in request.query_params:
required_mods_json = request.query_params.getlist("required_mods_json[]")
required_mods = get_bitwise_mods(required_mods_json)
else:
required_mods = parse_int_or_none(
Expand All @@ -108,8 +108,10 @@ def get(self, request, user_id, gamemode):
get_mod_acronyms(required_mods) if required_mods is not None else []
)

if "disqualified_mods_json" in request.query_params:
disqualified_mods_json = request.query_params["disqualified_mods_json"]
if "disqualified_mods_json[]" in request.query_params:
disqualified_mods_json = request.query_params.getlist(
"disqualified_mods_json[]"
)
disqualified_mods = get_bitwise_mods(disqualified_mods_json)
else:
disqualified_mods = parse_int_or_none(
Expand Down