Skip to content

Commit

Permalink
Merge pull request django-cms#42 from divio/issues/fix_form
Browse files Browse the repository at this point in the history
Fix a bug where we refer queryset in a widget instead a field.
  • Loading branch information
chronossc committed May 7, 2015
2 parents 2a2f335 + d0dcc7a commit 857a866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangocms_link/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 857a866

Please sign in to comment.