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


Ignore:
Timestamp:
Dec 20, 2018, 6:24:32 AM (6 years ago)
Author:
Simon Charette

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