Skip to content

Commit

Permalink
fix: error with show counts in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
fivan999 authored and ArtemSBulgakov committed Jan 16, 2025
1 parent 52839ce commit 9b28be9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion adminpage/sport/admin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ def choices(self, changelist):

def get_query_string(new_params=None, remove=None):
# call prior version with additional 'remove' fields
return f(new_params=new_params, remove=clear_list if remove is None else (clear_list + remove))
if remove is None:
return f(new_params=new_params, remove=clear_list)
if isinstance(remove, dict):
remove = [key for key in remove]
return f(new_params=new_params, remove=clear_list + remove)

# override get_query_string
changelist.get_query_string = get_query_string
Expand Down

0 comments on commit 9b28be9

Please sign in to comment.