Ticket #1740: models.diff

File models.diff, 830 bytes (added by James Bennett, 19 years ago)

patched models.py using new DB API

  • models.py

     
    124124        """
    125125        from django.core.exceptions import ObjectDoesNotExist
    126126        try:
    127             return self.get_content_type().get_object_for_this_type(pk=self.object_id)
     127            return self.content_type.get_object_for_this_type(pk=self.object_id)
    128128        except ObjectDoesNotExist:
    129129            return None
    130130
     
    200200        """
    201201        from django.core.exceptions import ObjectDoesNotExist
    202202        try:
    203             return self.get_content_type().get_object_for_this_type(pk=self.object_id)
     203            return self.content_type.get_object_for_this_type(pk=self.object_id)
    204204        except ObjectDoesNotExist:
    205205            return None
    206206
Back to Top