Changes between Version 2 and Version 3 of Ticket #27331, comment 7


Ignore:
Timestamp:
12/20/2018 06:24:32 AM (3 years ago)
Author:
Simon Charette
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27331, comment 7

    v2 v3  
    2525        if isinstance(choices_groupby, str):
    2626            choices_groupby = attrgetter(choices_groupby)
     27        elif not callable(choices_groupby):
     28            raise TypeError('choices_groupby must either be a str or a callable accepting a single argument')
    2729        self.iterator = partial(GroupedModelChoiceIterator, groupby=choices_groupby)
    2830        super().__init__(*args, **kwargs)
Back to Top