callowayproject/django-categories — Issue #32: Exception when trying to deactivate category
Author: nuno-iglesias
Created: 2012-03-06 17:19:54+00:00
State: open

Hi,
I'm receiving this error when trying to deactivate a catagory:

Django Version:	1.3.1
Exception Type:	AttributeError
Exception Value:

'CategoryAdmin' object has no attribute '_meta'

Exception Location:	/home/nuno/Proyectos/hella/src/libs/django-categories/categories/base.py in deactivate, line 132

The code which raise the exception is :

def deactivate(self, request, queryset):
"""
Set active to False for selected items
"""
--> opts = self._meta <-
selected_cats = opts.model.objects.filter(
pk__in=[int(x) for x in request.POST.getlist('_selected_action')])

I'm using this library by directy linking my model with the base Category..as in this case i need some king of "category flat pages"

category = models.OneToOneField('categories.Category')

Can anybody tell me if 'im doing something wrong?
Should I extends CatagoryBase and create a custom "Mycategory" model to use ths library?
Everything is working fine except this.

Thanks in advance