Skip to content

Commit

Permalink
Fix for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 26, 2024
1 parent 9f1cc7b commit 0943e23
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions djangocms_link/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from cms.models import PageContent
else:
from cms.models import Title as PageContent
PageContent.admin_manager = PageContent.objects

class GrouperModelAdmin:
pass
Expand All @@ -33,9 +34,6 @@ class GrouperModelAdmin:
REGISTERED_ADMIN.append(_admin)


print(REGISTERED_ADMIN)


class AdminUrlsView(BaseListView):
"""Handle AutocompleteWidget's AJAX requests for data."""

Expand Down Expand Up @@ -122,7 +120,7 @@ def get_queryset(self):
qs = Page.objects.filter(pk__in=qs).order_by("path")
if self.site:
qs = qs.filter(page__site_id=self.site)
except FieldError:
except (AttributeError, FieldError):
# django CMS 3.11 - 4.1
qs = PageContent.admin_manager.filter(
language=self.language, title__icontains=self.term
Expand Down

0 comments on commit 0943e23

Please sign in to comment.