Ticket #18829: 18829.diff

File 18829.diff, 455 bytes (added by thikonom, 12 years ago)
  • models.py

     
    897897                yield self.choice(obj)
    898898
    899899    def __len__(self):
    900         return len(self.queryset)
     900        return len(self.queryset) + (self.field.empty_label is not None)
    901901
    902902    def choice(self, obj):
    903903        return (self.field.prepare_value(obj), self.field.label_from_instance(obj))
Back to Top