Skip to content

Commit

Permalink
Fixed how the activate/deactivate methods in the admin fetched their …
Browse files Browse the repository at this point in the history
…models.
  • Loading branch information
coordt committed Mar 6, 2012
1 parent f3cc72a commit 6ce2a49
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions categories/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ def deactivate(self, request, queryset):
"""
Set active to False for selected items
"""
opts = self._meta
selected_cats = opts.model.objects.filter(
selected_cats = self.model.objects.filter(
pk__in=[int(x) for x in request.POST.getlist('_selected_action')])

for item in selected_cats:
Expand All @@ -144,9 +143,7 @@ def activate(self, request, queryset):
"""
Set active to True for selected items
"""
opts = self._meta

selected_cats = opts.model.objects.filter(
selected_cats = self.model.objects.filter(
pk__in=[int(x) for x in request.POST.getlist('_selected_action')])

for item in selected_cats:
Expand Down

0 comments on commit 6ce2a49

Please sign in to comment.