diff --git a/djangocms_link/forms.py b/djangocms_link/forms.py index 5f3d5457..749540f1 100644 --- a/djangocms_link/forms.py +++ b/djangocms_link/forms.py @@ -18,7 +18,7 @@ def for_site(self, site): # current site # this will work for PageSelectFormField from cms.models import Page - self.fields['page_link'].widget.queryset = Page.objects.drafts().on_site(site) + self.fields['page_link'].queryset = Page.objects.drafts().on_site(site) # set the current site as a page_link field instance attribute # this will be used by the field later to properly set up the queryset # this will work for PageSearchField