Ticket #10097: django-contrib-contenttypes-generic.patch

File django-contrib-contenttypes-generic.patch, 792 bytes (added by mattrussell, 16 years ago)
  • usr/local/src/django-trunk/django/contrib/contenttypes/generic.py

     
    307307        # Avoid a circular import.
    308308        from django.contrib.contenttypes.models import ContentType
    309309        if self.instance is None:
    310             return self.model._default_manager.empty()
     310            return self.model._default_manager.get_empty_query_set()
    311311        return self.model._default_manager.filter(**{
    312312            self.ct_field.name: ContentType.objects.get_for_model(self.instance),
    313313            self.ct_fk_field.name: self.instance.pk,
Back to Top