Skip to content

Commit

Permalink
Add site name in ModelMultipleChoiceField if site count >=2
Browse files Browse the repository at this point in the history
  • Loading branch information
haricot authored Mar 27, 2018
1 parent 7fde5bf commit 2930f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shop/admin/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def formfield_for_manytomany(self, db_field, request, **kwargs):
queryset = Page.objects.filter(**limit_choices_to)
widget = admin.widgets.FilteredSelectMultiple(_("CMS Pages"), False)
required = not db_field.blank
field = forms.ModelMultipleChoiceField(queryset=queryset, widget=widget, required=required)
field = CategoryModelMultipleChoiceField(queryset=queryset, widget=widget, required=required)
return field
return super(CMSPageAsCategoryMixin, self).formfield_for_manytomany(db_field, request, **kwargs)

Expand Down

0 comments on commit 2930f2f

Please sign in to comment.