diff --git a/djangocms_link/admin.py b/djangocms_link/admin.py index 2d827c0a..51c4aaea 100644 --- a/djangocms_link/admin.py +++ b/djangocms_link/admin.py @@ -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 @@ -33,9 +34,6 @@ class GrouperModelAdmin: REGISTERED_ADMIN.append(_admin) -print(REGISTERED_ADMIN) - - class AdminUrlsView(BaseListView): """Handle AutocompleteWidget's AJAX requests for data.""" @@ -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