Ticket #17888: 17888.patch

File 17888.patch, 652 bytes (added by Bruno Renié, 12 years ago)

Patch that breaks the current regression tests

  • django/forms/widgets.py

    diff --git a/django/forms/widgets.py b/django/forms/widgets.py
    index 1fbef98..c144330 100644
    a b class CheckboxInput(Widget):  
    499499
    500500    def render(self, name, value, attrs=None):
    501501        final_attrs = self.build_attrs(attrs, type='checkbox', name=name)
    502         try:
    503             result = self.check_test(value)
    504         except: # Silently catch exceptions
    505             result = False
     502        result = self.check_test(value)
    506503        if result:
    507504            final_attrs['checked'] = 'checked'
    508505        if not (value is True or value is False or value is None or value == ''):
Back to Top