Ticket #10097: django-contrib-contenttypes-generic.patch
File django-contrib-contenttypes-generic.patch, 792 bytes (added by , 16 years ago) |
---|
-
usr/local/src/django-trunk/django/contrib/contenttypes/generic.py
307 307 # Avoid a circular import. 308 308 from django.contrib.contenttypes.models import ContentType 309 309 if self.instance is None: 310 return self.model._default_manager. empty()310 return self.model._default_manager.get_empty_query_set() 311 311 return self.model._default_manager.filter(**{ 312 312 self.ct_field.name: ContentType.objects.get_for_model(self.instance), 313 313 self.ct_fk_field.name: self.instance.pk,