From d0dcc7a9bd6990d75713b53ce8a832119aa2958b Mon Sep 17 00:00:00 2001 From: Felipe Prenholato Date: Thu, 7 May 2015 11:13:26 -0300 Subject: [PATCH] Fix a bug where we refer queryset in a widget instead a field. --- djangocms_link/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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