Ticket #5199: formset_logic.patch

File formset_logic.patch, 548 bytes (added by David Blewett <david@…>, 11 years ago)

Patch that switches logic from "and" to "or"

  • formsets.py

    2121    """A collection of instances of the same Form class."""
    2323    def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None, initial=None):
    24         self.is_bound = data is not None and files is not None
     24        self.is_bound = data is not None or files is not None
    2525        self.prefix = prefix or 'form'
    2626        self.auto_id = auto_id
    2727        self.data = data
Back to Top