Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
adress review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
monodo committed May 28, 2024
1 parent 18bdacc commit 643e603
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions geocity/apps/submissions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_list_display(self, request):
return list_display

# Fields used in search_fields and list_filter
superadmin_search_fields = [
superusersearch_fields = [
"name",
"form__name",
"integrator__name",
Expand All @@ -272,7 +272,7 @@ def get_list_display(self, request):
"form__name",
]

superadmin_list_search_fields = [
superuser_list_search_fields = [
"name",
"form",
"integrator",
Expand All @@ -285,14 +285,14 @@ def get_list_display(self, request):

def get_search_fields(self, request):
if request.user.is_superuser:
search_fields = self.superadmin_search_fields
search_fields = self.superuser_search_fields
else:
search_fields = self.integrator_search_fields
return search_fields

def get_list_filter(self, request):
if request.user.is_superuser:
list_filter = self.superadmin_list_search_fields
list_filter = self.superuser_list_search_fields
else:
list_filter = self.integrator_list_search_fields
return list_filter
Expand Down

0 comments on commit 643e603

Please sign in to comment.