Skip to content

Commit

Permalink
Merge pull request #58 from mback2k/master
Browse files Browse the repository at this point in the history
Limiting choices in choices_for_values makes no sense, it is only needed in choices_for_request.
  • Loading branch information
jpic committed Nov 2, 2012
2 parents d50fdbf + 3e6825e commit bcae3af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autocomplete_light/autocomplete/choice_list.py
Expand Up @@ -13,7 +13,7 @@ def choices_for_values(self):
if choice[0] in self.values:
values_choices.append(choice)

return self.order_choices(values_choices)[0:self.limit_choices]
return self.order_choices(values_choices)

def choices_for_request(self):
requests_choices = []
Expand Down
2 changes: 1 addition & 1 deletion autocomplete_light/autocomplete/list.py
Expand Up @@ -12,7 +12,7 @@ def choices_for_values(self):
if choice in self.values:
values_choices.append(choice)

return self.order_choices(values_choices)[0:self.limit_choices]
return self.order_choices(values_choices)

def choices_for_request(self):
assert self.choices, 'autocomplete.choices is not set'
Expand Down
4 changes: 2 additions & 2 deletions autocomplete_light/autocomplete/model.py
Expand Up @@ -22,8 +22,8 @@ def order_choices(self, choices):

def choices_for_values(self):
assert self.choices is not None, 'choices should be a queryset'
return self.order_choices(self.choices.filter(pk__in=self.values or [])
)[0:self.limit_choices]
return self.order_choices(self.choices.filter(
pk__in=self.values or []))

def choices_for_request(self):
assert self.choices is not None, 'choices should be a queryset'
Expand Down

0 comments on commit bcae3af

Please sign in to comment.