Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/5.9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbegbie committed Nov 15, 2017
2 parents 7ce2d35 + d1fd5ae commit 69b76d2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGE LOG
==========

5.9.2
-----
- Added a filter to check if a form field is a checkbox

5.9.1
-----
- Bug Fix: Update wagtail-personalisation-molo which adds in collectstatic
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.9.1
5.9.2
6 changes: 6 additions & 0 deletions molo/surveys/templatetags/molo_survey_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django import template
from django.forms.fields import MultipleChoiceField

from copy import copy
from wagtail.wagtailcore.models import Page
Expand Down Expand Up @@ -127,3 +128,8 @@ def surveys_list_for_pages(context, pk=None, page=None):
'surveys': get_pages(context, surveys, locale_code)
})
return add_form_objects_to_surveys(context)


@register.filter(name='is_multiple_choice_field')
def is_multiple_choice_field(value):
return isinstance(value.field, MultipleChoiceField)

0 comments on commit 69b76d2

Please sign in to comment.