|
|
@@ -223,7 +223,7 @@ class ObjectTypeListFilter(admin.SimpleListFilter):
|
|
|
parameter_name = 'object_type'
|
|
|
|
|
|
def lookups(self, request, model_admin):
|
|
|
- object_types = ObjectPermission.objects.values_list('id', flat=True).distinct()
|
|
|
+ object_types = ObjectPermission.objects.values_list('object_types__pk', flat=True).distinct()
|
|
|
content_types = ContentType.objects.filter(pk__in=object_types).order_by('app_label', 'model')
|
|
|
return [
|
|
|
(ct.pk, ct) for ct in content_types
|