mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Fixed how the activate/deactivate methods in the admin fetched their models.
This commit is contained in:
parent
f3cc72a76b
commit
6ce2a49d2e
1 changed files with 2 additions and 5 deletions
|
|
@ -129,8 +129,7 @@ class CategoryBaseAdmin(TreeEditor, admin.ModelAdmin):
|
|||
"""
|
||||
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:
|
||||
|
|
@ -144,9 +143,7 @@ class CategoryBaseAdmin(TreeEditor, admin.ModelAdmin):
|
|||
"""
|
||||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue