Skip to content

Commit

Permalink
fix: revert adding search_help_text in versions less than 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aqeelat committed Jul 17, 2023
1 parent 9449eb3 commit c95b332
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
=========
3.0.8
-----
* only add search_help_text in django >= 4.0

3.0.7
-----
* Django 4.1.7 Compatible
Expand Down
2 changes: 1 addition & 1 deletion jet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '3.0.7'
VERSION = '3.0.8'
8 changes: 6 additions & 2 deletions jet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.utils import translation
from jet import settings
from jet.models import PinnedApplication
import django

try:
from django.apps.registry import apps
Expand Down Expand Up @@ -219,12 +220,15 @@ def get_model_queryset(admin_site, model, request, preserved_filters=None):

ChangeList = model_admin.get_changelist(request)

search_help_text = model_admin.search_help_text
change_list_args = [
request, model, list_display, list_display_links, list_filter,
model_admin.date_hierarchy, search_fields, list_select_related,
model_admin.list_per_page, model_admin.list_max_show_all,
model_admin.list_editable, model_admin, search_help_text]
model_admin.list_editable, model_admin]

if django.VERSION[0] >= 4:
search_help_text = model_admin.search_help_text
change_list_args.append(search_help_text)

try:
sortable_by = model_admin.get_sortable_by(request)
Expand Down

0 comments on commit c95b332

Please sign in to comment.