Ticket #1281: 1281_patch.diff

File 1281_patch.diff, 773 bytes (added by python@…, 19 years ago)

patch (same as diff in description)

  • c:/python24/lib/site-packages/django-0.91-py2.4.egg/django/core/meta/__init__.py

     
    460460        for f in to_search:
    461461            if f.name == name:
    462462                return f
     463        if (hasattr(self, 'one_to_one_field') and
     464            self.one_to_one_field is not None and
     465            self.one_to_one_field.name == name):
     466            return self.one_to_one_field
    463467        raise FieldDoesNotExist, "name=%s" % name
    464468
    465469    def get_order_sql(self, table_prefix=''):
Back to Top