Ticket #18829: 18829.diff
File 18829.diff, 455 bytes (added by , 12 years ago) |
---|
-
models.py
897 897 yield self.choice(obj) 898 898 899 899 def __len__(self): 900 return len(self.queryset) 900 return len(self.queryset) + (self.field.empty_label is not None) 901 901 902 902 def choice(self, obj): 903 903 return (self.field.prepare_value(obj), self.field.label_from_instance(obj))